@digitransit-util/digitransit-util-route-pattern-option-text
v1.1.2
Published
digitransit-util route-pattern-option-text module
Downloads
14
Maintainers
Readme
@digitransit-util/digitransit-util-route-pattern-option-text
routePatternOptionText
Parameters
language
String Language of translation (e.g. 'fi', 'en' or 'sv')pattern
object JSON object of patternisTogglable
boolean Determine what kind of component is shown (div or option)
Examples
digitransit-util.routePatternOptionText('fi', {"code":"HSL:3002U:0:02","headsign":"Kirkkonummi","stops":[{"name":"Helsinki"},{"name":"Kirkkonummi"}],"tripsForDate":[],"activeDates":["20200221","20200222","20200228","20200229","20200306","20200307"],"rangeFollowingDays":[["20200221","20200222"],["20200228","20200229"],["20200306","20200307"]],"dayDiff":[0,1,6,1,6,1],"dayString":"pe-la","allowedDiff":2,"fromDate":"20200221","untilDate":"-"}, true);
//=Kirkkonummi ➔ Helsinki
Returns String Option text for pattern's route
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-util/digitransit-util-route-pattern-option-text
Or install the Digitransit-util module that includes it as a function:
$ npm install @digitransit-util/digitransit-util