vbb-parse-line
Parses the names of VBB lines like M4
, TXL
, S42
.
![support me on Patreon](https://img.shields.io/badge/support%20me-on%20patreon-fa7664.svg)
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
npm install vbb-parse-line
Usage
const parse = require('vbb-parse-line')
parse('M4')
This will return the following.
{
mode: 'train',
product: 'tram',
symbol: 'M',
nr: 4
metro: true
express: false
night: false
}
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.