Comparing version 0.9.3 to 0.10.0
'use strict' | ||
const lines = { | ||
fares: require('./fares') | ||
, legs: require('./legs/index') | ||
legs: require('./legs/index') | ||
, colors: require('./colors') | ||
@@ -7,0 +6,0 @@ } |
@@ -37,6 +37,10 @@ 'use strict' | ||
t.stringify = (types) => Object.keys(types) | ||
.filter((type) => type in t) | ||
.filter((type) => t[type].alt) | ||
.join('') | ||
const all = ['station', 'address', 'poi'] | ||
t.stringify = (types) => { | ||
if (all.every((t) => types[t])) return 'ALL' | ||
return all.reduce((r, x) => { | ||
if (types[x]) r += t[x].alt | ||
return r | ||
}, '') | ||
} | ||
@@ -43,0 +47,0 @@ t.parse = (types) => types.split('') |
{ | ||
"name": "vbb-util", | ||
"description": "JavaScript utilites for the VBB API client.", | ||
"version": "0.9.3", | ||
"version": "0.10.0", | ||
"main": "./src/index", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
# vbb-util 🛠 | ||
*vbb-util* is a colleciton of **JavaScript utilities for the [VBB API client](https://github.com/derhuerst/vbb)**. | ||
*vbb-util* is a colleciton of **JavaScript utilities for VBB public transport stuff**, used in these projects: | ||
- [`vbb-rest`](https://gitter.im/derhuerst/vbb-rest) REST API | ||
- [`vbb-telegram`](https://gitter.im/derhuerst/vbb-telegram) Telegram Bot | ||
- [`vbb-hafas`](https://gitter.im/derhuerst/vbb-hafas) API client | ||
[![npm version](https://img.shields.io/npm/v/vbb-util.svg)](https://www.npmjs.com/package/vbb-util) | ||
@@ -6,0 +10,0 @@ [![dependency status](https://img.shields.io/david/derhuerst/vbb-util.svg)](https://david-dm.org/derhuerst/vbb-util) |
18
15000
18
531