Socket
Socket
Sign inDemoInstall

cryptocompare

Package Overview
Dependencies
0
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.0 to 0.5.0

5

CHANGELOG.md

@@ -0,1 +1,6 @@

0.5.0 / 2018-03-23
------------------
- changed: Handles HTTP status errors; throws on non-2xx error codes [#20](https://github.com/ExodusMovement/cryptocompare/pull/20)
0.4.0 / 2018-01-09

@@ -2,0 +7,0 @@ ------------------

7

index.js

@@ -8,3 +8,8 @@ 'use strict'

return fetch(url)
.then(res => res.json())
.then(res => {
if (!res.ok) {
throw new Error(`${res.status} ${res.statusText}`)
}
return res.json()
})
.then(body => {

@@ -11,0 +16,0 @@ if (body.Response === 'Error') throw body.Message

2

package.json
{
"name": "cryptocompare",
"description": "CryptoCompare JavaScript API",
"version": "0.4.0",
"version": "0.5.0",
"author": "JP Richardson <jprichardson@gmail.com>",

@@ -6,0 +6,0 @@ "bugs": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc