Comparing version 1.2.0 to 5.0.0
@@ -103,3 +103,10 @@ const http = require('http') | ||
} else if (encoding === 'json') { | ||
resolve(JSON.parse(buff.toString())) | ||
let ret | ||
try { | ||
ret = JSON.parse(buff.toString()) | ||
resolve(ret) | ||
} catch (e) { | ||
e.message += `str"${buff.toString()}"` | ||
reject(e) | ||
} | ||
} else if (encoding === 'string') { | ||
@@ -106,0 +113,0 @@ resolve(buff.toString()) |
{ | ||
"name": "bent", | ||
"version": "1.2.0", | ||
"version": "5.0.0", | ||
"description": "Functional HTTP client for Node.js w/ async/await.", | ||
@@ -19,3 +19,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"bl": "^1.2.1", | ||
"bl": "^2.1.2", | ||
"caseless": "^0.12.0", | ||
@@ -25,10 +25,10 @@ "is-stream": "^1.1.0" | ||
"devDependencies": { | ||
"browserify": "^14.5.0", | ||
"browserify": "^16.2.3", | ||
"budo": "^10.0.4", | ||
"codecov": "^3.0.0", | ||
"cz-conventional-changelog": "^2.1.0", | ||
"husky": "^0.14.3", | ||
"husky": "^1.3.1", | ||
"semantic-release": "^15.13.1", | ||
"standard": "^10.0.3", | ||
"tap": "^10.7.3", | ||
"tap": "^12.5.0", | ||
"validate-commit-msg": "^2.14.0" | ||
@@ -35,0 +35,0 @@ }, |
@@ -5,8 +5,2 @@ # bent | ||
<p> | ||
<a href="https://www.patreon.com/bePatron?u=880479"> | ||
<img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" height="40px" /> | ||
</a> | ||
</p> | ||
## Usage | ||
@@ -13,0 +7,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15814
348
61