db-vendo-client/parse/nearby.js
Jannis R 8881d8a1a4
parse fns: individual params -> data object 💥
From now on, all higher-level parse fns will be able to access more
of the response data while keeping their signature.

- parseLine
- parseDeparture
- parseJourney
- parseJourneyLeg
- parseLocation
- parseMovement
- parsePolyline
- parseNearby
- parseStopover
2018-06-13 20:05:24 +02:00

16 lines
363 B
JavaScript

'use strict'
// todo: remarks
// todo: lines
// todo: what is s.pCls?
// todo: what is s.wt?
// todo: what is s.dur?
// todo: [breaking] change to createParseNearby(profile, data) => (n) => nearby
const parseNearby = (profile, data, n) => {
const res = profile.parseLocation(profile, data, n)
res.distance = n.dist
return res
}
module.exports = parseNearby