@digitransit-search-util/digitransit-search-util-route-name-compare

0.0.2 • Public • Published

@digitransit-search-util/digitransit-search-util-route-name-compare

routeNameCompare

Compares routenames

Parameters

  • a Object { shortName: String, longName: String, agency: { name: String } }
  • b Object Same as a

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

Package Sidebar

Install

npm i @digitransit-search-util/digitransit-search-util-route-name-compare

Weekly Downloads

4

Version

0.0.2

License

(AGPL-3.0 OR EUPL-1.2)

Unpacked Size

52.9 kB

Total Files

6

Last publish

Collaborators

  • digitransit