Socket
Socket
Sign inDemoInstall

elara-google-search

Package Overview
Dependencies
36
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

7

index.js

@@ -11,3 +11,8 @@ module.exports = class Google{

if(res.status === 200){
return {status: true, res: res.body};
let links = [];
if(res.body.items.length === 0) return {status: false, message: `Nothing for that. :(`};
for await (const i of res.body.items){
links.push(i.link);
};
return {status: true, res: res.body, links: links};
}else{

@@ -14,0 +19,0 @@ return {status: false, message: `I was unable to find a search for that.`};

2

package.json
{
"name": "elara-google-search",
"version": "1.0.1",
"version": "1.0.2",
"description": "Returns the google search results, requires an api key & cx ID",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -11,3 +11,3 @@ #Example Usage

// Success
console.log(res);
console.log(res); // "res.links" to return all of the links found for that search!
}else{

@@ -14,0 +14,0 @@ // Failed

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