@digitransit-search-util/digitransit-search-util-route-name-compare
routeNameCompare
Compares routenames
Parameters
Examples
const a = {
shortName: 'hki',
longName: 'Helsinki',
agency: {
name: 'hsl',
},
};
const b = {
shortName: 'hki',
longName: 'Helsinki',
agency: {
name: 'hsl',
},
};
digitransit-search-util.routeNameCompare(a, b);
//= 0
Returns Number 0 True -1 false
This module is part of the Digitransit-ui project. It is maintained in the HSLdevcom/digitransit-ui repository, where you can create PRs and issues.
Installation
Install this module individually:
$ npm install @digitransit-search-util/digitransit-search-util-route-name-compare
Or install the Digitransit-util module that includes it as a function:
$ npm install @digitransit-util/digitransit-util