mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
parent
c5aab72e71
commit
00b1eb387c
2 changed files with 4 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
const crypto = require('crypto')
|
const createHash = require('create-hash')
|
||||||
let captureStackTrace = () => {}
|
let captureStackTrace = () => {}
|
||||||
if (process.env.NODE_DEBUG === 'hafas-client') {
|
if (process.env.NODE_DEBUG === 'hafas-client') {
|
||||||
captureStackTrace = require('capture-stack-trace')
|
captureStackTrace = require('capture-stack-trace')
|
||||||
|
@ -9,7 +9,7 @@ const {stringify} = require('query-string')
|
||||||
const Promise = require('pinkie-promise')
|
const Promise = require('pinkie-promise')
|
||||||
const {fetch} = require('fetch-ponyfill')({Promise})
|
const {fetch} = require('fetch-ponyfill')({Promise})
|
||||||
|
|
||||||
const md5 = input => crypto.createHash('md5').update(input).digest()
|
const md5 = input => createHash('md5').update(input).digest()
|
||||||
|
|
||||||
const request = (profile, data) => {
|
const request = (profile, data) => {
|
||||||
const body = profile.transformReqBody({lang: 'en', svcReqL: [data]})
|
const body = profile.transformReqBody({lang: 'en', svcReqL: [data]})
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "hafas-client",
|
"name": "hafas-client",
|
||||||
"description": "JavaScript client for HAFAS public transport APIs.",
|
"description": "JavaScript client for HAFAS public transport APIs.",
|
||||||
"version": "2.7.2",
|
"version": "2.7.3",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
|
@ -34,6 +34,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mapbox/polyline": "^1.0.0",
|
"@mapbox/polyline": "^1.0.0",
|
||||||
"capture-stack-trace": "^1.0.0",
|
"capture-stack-trace": "^1.0.0",
|
||||||
|
"create-hash": "^1.2.0",
|
||||||
"fetch-ponyfill": "^6.0.0",
|
"fetch-ponyfill": "^6.0.0",
|
||||||
"gps-distance": "0.0.4",
|
"gps-distance": "0.0.4",
|
||||||
"lodash": "^4.17.5",
|
"lodash": "^4.17.5",
|
||||||
|
|
Loading…
Add table
Reference in a new issue