Socket
Socket
Sign inDemoInstall

bestbuy

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bestbuy - npm Package Compare versions

Comparing version 2.1.3 to 2.1.4

.gitignore

3

CHANGELOG.md

@@ -0,1 +1,4 @@

## 2.1.4 (2020-01-29)
- Pass errors to debug function.
## 2.1.3 (2017-11-21)

@@ -2,0 +5,0 @@ - Fix bug in openBox endpoint that prevented searching for all open box items (null search).

20

lib/debug-logger.js

@@ -13,11 +13,14 @@ module.exports = debugLogger;

debugFn = (data) => {
var formattedData;
try {
formattedData = JSON.stringify(data, null, 2);
} catch (err) {
console.error('Error while trying to JSON format the data!', err.message, err.stack);
formattedData = data;
if (data.error) {
console.error(data.error);
} else {
var formattedData;
try {
formattedData = JSON.stringify(data, null, 2);
} catch (err) {
console.error('Error while trying to JSON format the data!', err.message, err.stack);
formattedData = data;
}
console.log(formattedData);
}
console.log(formattedData);
};

@@ -71,4 +74,5 @@ }

}, function (error) {
debugFn({ error });
throw error;
});
}
{
"name": "bestbuy",
"version": "2.1.3",
"version": "2.1.4",
"description": "High level node.js client for the Best Buy API.",

@@ -37,3 +37,3 @@ "main": "index.js",

"JSONStream": "^1.3.1",
"axios": "^0.16.2",
"axios": "^0.18.1",
"limiter": "^1.1.0",

@@ -50,4 +50,4 @@ "peek-stream": "^1.1.2",

"tape": "^4.6.3",
"tape-nock": "^1.4.0"
"tape-nock": "1.4.1"
}
}

@@ -424,3 +424,3 @@ # Best Buy API

});
// The debug function will be called for each request and each response.
// The debug function will be called for each request, response, and error thrown by the internal HTTP client.
```

@@ -427,0 +427,0 @@

@@ -86,3 +86,3 @@ var test = require('./lib/tape-nock-setup');

// Do a search which emits an error
bby.products('gurgleflats????4')
bby.products('gurgleflats')
.catch(function (data) {

@@ -96,3 +96,3 @@ t.equals(data.status, 400, 'status 400 returned');

// Do a search which emits an error
bby.products('gurgleflats????4', (err, result) => {
bby.products('gurgleflats', (err, result) => {
t.equals(err.status, 400, 'status 400 returned');

@@ -212,3 +212,3 @@ t.end();

// Do a search which emits an error
var stream = bby.productsAsStream('gurgleflats????4', {format: 'xml'});
var stream = bby.productsAsStream('gurgleflats', {format: 'xml'});

@@ -215,0 +215,0 @@ stream.on('error', err => {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc