https://github.com/derhuerst/vbb-parse-line
Parse VBB lines like M4, TXL, S42.
https://github.com/derhuerst/vbb-parse-line
berlin bvg transit transport vbb
Last synced: 4 months ago
JSON representation
Parse VBB lines like M4, TXL, S42.
- Host: GitHub
- URL: https://github.com/derhuerst/vbb-parse-line
- Owner: derhuerst
- License: isc
- Created: 2016-03-30T14:19:08.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-06-21T17:17:09.000Z (almost 6 years ago)
- Last Synced: 2025-02-07T20:16:25.396Z (4 months ago)
- Topics: berlin, bvg, transit, transport, vbb
- Language: JavaScript
- Homepage: https://github.com/derhuerst/vbb-parse-line
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# *vbb-parse-line*
**Parses the names of VBB lines like `M4`, `TXL`, `S42`.**
[](https://www.npmjs.com/package/vbb-parse-line)
[](https://travis-ci.org/derhuerst/vbb-parse-line)

[](https://gitter.im/derhuerst)
[](https://patreon.com/derhuerst)Because this module tries to guess the mode of transport from line names, it is doomed to have conflicts. Right now, it is primarily focused on Berlin, until we have a more robust solution to find out more about lines.
## Installing
```shell
npm install vbb-parse-line
```## Usage
```js
const parse = require('vbb-parse-line')
parse('M4')
```This will return the following.
```js
{
mode: 'train',
product: 'tram',
symbol: 'M',
nr: 4
metro: true // buses & trams that run frequently & all day
express: false // buses that skip stations
night: false // buses replacing other lines in the night
}
```## Contributing
If you have a question or have difficulties using `vbb-parse-line`, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to [the issues page](https://github.com/derhuerst/vbb-parse-line/issues).