mirror of
https://github.com/HSLdevcom/digitransit-ui
synced 2025-07-06 09:30:37 +02:00
61 lines
1.6 KiB
Markdown
61 lines
1.6 KiB
Markdown
# @digitransit-search-util/digitransit-search-util-is-duplicate
|
|
|
|
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
|
|
|
|
## isDuplicate
|
|
|
|
Checks that is items duplicate
|
|
|
|
### Parameters
|
|
|
|
- `item1` **[Object][1]** Object containing following attributes:
|
|
{
|
|
properties {
|
|
gtfsId: String
|
|
gid: String from geocoder
|
|
name: String
|
|
label: String
|
|
address: String
|
|
geometry {
|
|
coordinates [Number lat, Number lon]
|
|
}
|
|
}
|
|
}
|
|
- `item2` **[Object][1]** Object with same attributes as item1
|
|
|
|
### Examples
|
|
|
|
```javascript
|
|
digitransit-util.isDuplicate(param1, param2);
|
|
//=true
|
|
```
|
|
|
|
Returns **[Boolean][2]** true/false
|
|
|
|
[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
|
|
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
|
|
<!-- This file is automatically generated. Please don't edit it directly:
|
|
if you find an error, edit the source file (likely index.js), and re-run
|
|
./scripts/generate-readmes in the digitransit-util project. -->
|
|
|
|
---
|
|
|
|
This module is part of the Digitransit-ui project. It is maintained in the
|
|
[HSLdevcom/digitransit-ui](https://github.com/HSLdevcom/digitransit-ui) repository, where you can create
|
|
PRs and issues.
|
|
|
|
### Installation
|
|
|
|
Install this module individually:
|
|
|
|
```sh
|
|
$ npm install @digitransit-search-util/digitransit-search-util-is-duplicate
|
|
```
|
|
|
|
Or install the Digitransit-util module that includes it as a function:
|
|
|
|
```sh
|
|
$ npm install @digitransit-util/digitransit-util
|
|
```
|