Compare commits

...

2 Commits

@ -96,6 +96,10 @@ An error type that signifies that the response body could not be parsed as JSON.
## Changelog
### 1.0.1 (August 30, 2019)
- Removed erroneous `console.log`.
### 1.0.0 (August 30, 2019)
Initial release.

@ -21,8 +21,6 @@ module.exports = {
let validateStatus = defaultValue(options.validateStatus, (status) => status >= 200 && status < 300);
if (validateStatus(response.status)) {
console.log(response.data);
try {
return JSON.parse(response.data);
} catch (error) {

@ -1,7 +1,7 @@
{
"name": "axios-get-json-response",
"description": "A small utility for validating an axios response and parsing it as JSON, *with* distinguishable error types",
"version": "1.0.0",
"version": "1.0.1",
"main": "index.js",
"repository": "http://git.cryto.net/joepie91/axios-get-json-response.git",
"author": "Sven Slootweg <admin@cryto.net>",

Loading…
Cancel
Save