Socket
Socket
Sign inDemoInstall

google-books-search-2

Package Overview
Dependencies
2
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.4 to 0.1.5

38

lib/google-books-search.js

@@ -50,25 +50,25 @@ /**

return new Promise(function(resolve, reject) {
var options = extend(defaultOptions, options || {});
// Validate options
if (!query) {
reject(new Error("Query is required"));
return;
}
// Validate options
if ( ! query ) {
reject(new Error("Query is required"));
return;
}
if ( options.offset < 0) {
reject(new Error("Offset cannot be below 0"));
return;
}
if ( options.offset < 0) {
reject(new Error("Offset cannot be below 0"));
return;
}
if ( options.limit < 1 || options.limit > 40 ) {
reject(new Error("Limit must be between 1 and 40"));
return;
}
if ( options.limit < 1 || options.limit > 40 ) {
reject(new Error("Limit must be between 1 and 40"));
return;
}
// Set any special keywords
if (options.field) {
query = fields[options.field] + query;
}
// Set any special keywords
if (options.field) {
query = fields[options.field] + query;
}
return new Promise(function(resolve, reject) {
var options = extend(defaultOptions, options || {});

@@ -75,0 +75,0 @@ // Create the request uri

{
"name": "google-books-search-2",
"version": "0.1.4",
"version": "0.1.5",
"description": "A node wrapper for the Google Books API. Based on the original project google-books-search.",

@@ -5,0 +5,0 @@ "main": "./lib/google-books-search.js",

Sorry, the diff of this file is not supported yet

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