mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 23:29:35 +02:00
allow for overwriting parseProducts & formatProductsFilter
This commit is contained in:
parent
bc51d257fd
commit
ad4d60f3ca
1 changed files with 4 additions and 3 deletions
7
index.js
7
index.js
|
@ -13,9 +13,10 @@ const isObj = o => o !== null && 'object' === typeof o && !Array.isArray(o)
|
||||||
const isNonEmptyString = str => 'string' === typeof str && str.length > 0
|
const isNonEmptyString = str => 'string' === typeof str && str.length > 0
|
||||||
|
|
||||||
const createClient = (profile, request = _request) => {
|
const createClient = (profile, request = _request) => {
|
||||||
profile = Object.assign({}, defaultProfile, profile)
|
profile = Object.assign({
|
||||||
profile.parseProducts = createParseBitmask(profile)
|
parseProducts: createParseBitmask(profile),
|
||||||
profile.formatProductsFilter = createFormatProductsFilter(profile)
|
formatProductsFilter: createFormatProductsFilter(profile)
|
||||||
|
}, defaultProfile, profile)
|
||||||
validateProfile(profile)
|
validateProfile(profile)
|
||||||
|
|
||||||
const departures = (station, opt = {}) => {
|
const departures = (station, opt = {}) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue