Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/derhuerst/vbb-translate-ids
Translate VBB IDs from 9-digit to 12-digit and reverse.
https://github.com/derhuerst/vbb-translate-ids
berlin bvg transit transport vbb
Last synced: 6 days ago
JSON representation
Translate VBB IDs from 9-digit to 12-digit and reverse.
- Host: GitHub
- URL: https://github.com/derhuerst/vbb-translate-ids
- Owner: derhuerst
- License: isc
- Created: 2016-12-11T15:40:31.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-01-29T00:35:44.000Z (almost 5 years ago)
- Last Synced: 2024-10-03T23:56:43.286Z (about 1 month ago)
- Topics: berlin, bvg, transit, transport, vbb
- Language: JavaScript
- Homepage: https://github.com/derhuerst/vbb-translate-ids
- Size: 235 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# vbb-translate-ids
**Translate VBB IDs from 9-digit to 12-digit and reverse.**
[![npm version](https://img.shields.io/npm/v/vbb-translate-ids.svg)](https://www.npmjs.com/package/vbb-translate-ids)
[![build status](https://img.shields.io/travis/derhuerst/vbb-translate-ids.svg)](https://travis-ci.org/derhuerst/vbb-translate-ids)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/vbb-translate-ids.svg)
[![gitter channel](https://badges.gitter.im/derhuerst/vbb-rest.svg)](https://gitter.im/derhuerst/vbb-rest)## Installing
```shell
npm install vbb-translate-ids
```## Usage
```js
const {to12Digit, to9Digit} = require('vbb-translate-ids')assert.strictEqual(to12Digit('900003201'), '900000003201')
assert.strictEqual(to9Digit('900000003201'), '900003201')
```If `to12Digit`/`to9Digit` don't know how to translate the ID, they will just return it.
## Contributing
If you **have a question**, **found a bug** or want to **propose a feature**, have a look at [the issues page](https://github.com/derhuerst/vbb-translate-ids/issues).