wili
Advanced tools
Comparing version 0.5.0 to 0.5.1
{ | ||
"name": "wili", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "A Node client for the Wiener Linien public transport API", | ||
@@ -35,20 +35,20 @@ "author": "Jan T. Sott", | ||
"isomorphic-fetch": "^3.0.0", | ||
"query-string": "^7.0.1" | ||
"query-string": "^7.1.1" | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^19.0.1", | ||
"@rollup/plugin-commonjs": "^22.0.1", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@rollup/plugin-node-resolve": "^13.0.4", | ||
"@rollup/plugin-typescript": "^8.2.0", | ||
"@types/node": "^14.0.26", | ||
"@typescript-eslint/eslint-plugin": "^4.16.1", | ||
"@typescript-eslint/parser": "^4.16.1", | ||
"ava": "^3.15.0", | ||
"@rollup/plugin-node-resolve": "^13.3.0", | ||
"@rollup/plugin-typescript": "^8.3.3", | ||
"@types/node": "^16.11.45", | ||
"@typescript-eslint/eslint-plugin": "^5.31.0", | ||
"@typescript-eslint/parser": "^5.31.0", | ||
"ava": "^4.3.1", | ||
"encoding": "^0.1.13", | ||
"eslint": "^7.5.0", | ||
"husky": "^7.0.0", | ||
"lint-staged": "^11.1.1", | ||
"rollup": "^2.23.0", | ||
"tslib": "^2.2.0", | ||
"typescript": "^4.2.3" | ||
"eslint": "^8.20.0", | ||
"husky": "^8.0.1", | ||
"lint-staged": "^13.0.3", | ||
"rollup": "^2.77.2", | ||
"tslib": "^2.4.0", | ||
"typescript": "^4.7.4" | ||
}, | ||
@@ -55,0 +55,0 @@ "lint-staged": { |
@@ -6,3 +6,2 @@ # wili | ||
[![CI](https://img.shields.io/github/workflow/status/idleberg/node-wili/CI?style=flat-square)](https://github.com/idleberg/node-wili/actions) | ||
[![David](https://flat.badgen.net/david/dep/idleberg/node-wili)](https://david-dm.org/idleberg/node-wili) | ||
@@ -28,5 +27,3 @@ [English](README.md) | **Deutsch** | ||
// Der API-Key kann weggelassen werden, wenn | ||
// process.env.WIENER_LINIEN_API_KEY gesetzt ist | ||
const wl = new WienerLinien(API_KEY); | ||
const wili = new WienerLinien(); | ||
@@ -38,19 +35,17 @@ const options = { | ||
// Promise API | ||
wl.trafficInfoList(options) | ||
.then( data => { | ||
wili.trafficInfoList(options) | ||
.then( data => { | ||
console.log(data.trafficInfos); | ||
}) | ||
.catch( error => { | ||
console.error(error); | ||
}); | ||
// async/await | ||
try { | ||
let data = await wili.trafficInfoList(options); | ||
console.log(data.trafficInfos); | ||
}) | ||
.catch( error => { | ||
} catch (output) { | ||
console.error(error); | ||
}); | ||
// async/await | ||
(async () => { | ||
try { | ||
let data = await wl.trafficInfoList(options); | ||
console.log(data.trafficInfos); | ||
} catch (output) { | ||
console.error(error); | ||
} | ||
})(); | ||
} | ||
``` | ||
@@ -57,0 +52,0 @@ |
@@ -6,3 +6,2 @@ # wili | ||
[![CI](https://img.shields.io/github/workflow/status/idleberg/node-wili/CI?style=flat-square)](https://github.com/idleberg/node-wili/actions) | ||
[![David](https://flat.badgen.net/david/dep/idleberg/node-wili)](https://david-dm.org/idleberg/node-wili) | ||
@@ -28,5 +27,3 @@ **English** | [Deutsch](README.de.md) | ||
// The API key can be omitted when | ||
// process.env.WIENER_LINIEN_API_KEY is set | ||
const wl = new WienerLinien(API_KEY); | ||
const wili = new WienerLinien(); | ||
@@ -38,19 +35,17 @@ const options = { | ||
// Promise API | ||
wl.trafficInfoList(options) | ||
.then( data => { | ||
wili.trafficInfoList(options) | ||
.then( data => { | ||
console.log(data.trafficInfos); | ||
}) | ||
.catch( error => { | ||
console.error(error); | ||
}); | ||
// async/await | ||
try { | ||
let data = await wili.trafficInfoList(options); | ||
console.log(data.trafficInfos); | ||
}) | ||
.catch( error => { | ||
} catch (output) { | ||
console.error(error); | ||
}); | ||
// async/await | ||
(async () => { | ||
try { | ||
let data = await wl.trafficInfoList(options); | ||
console.log(data.trafficInfos); | ||
} catch (output) { | ||
console.error(error); | ||
} | ||
})(); | ||
} | ||
``` | ||
@@ -57,0 +52,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
92693
11
2
127
Updatedquery-string@^7.1.1