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.2.0 to 0.3.0

34

lib/google-books-search.js

@@ -50,18 +50,4 @@ /**

// Validate options
if (!query) {
reject(new Error("Query is required"));
return;
}
var options = extend(defaultOptions, options || {});
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;
}
// Set any special keywords

@@ -72,4 +58,2 @@ if (options.field) {

var options = extend(defaultOptions, options || {});
// Create the request uri

@@ -93,2 +77,18 @@ var queryUrl = {

// 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.limit < 1 || options.limit > 40) {
reject(new Error("Limit must be between 1 and 40"));
return;
}
// Send Request

@@ -95,0 +95,0 @@ https.get(uri, function (response) {

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

@@ -13,2 +13,4 @@ "main": "./lib/google-books-search.js",

"devDependencies": {
"chai": "^3.0.0",
"chai-as-promised": "^5.1.0",
"mocha": "1.x.x",

@@ -18,3 +20,3 @@ "should": "0.6.x"

"scripts": {
"test": "make test"
"test": "mocha --timeout 10000 --reporter spec"
},

@@ -21,0 +23,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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