Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

google-it

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-it - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

.eslintignore

8

package.json
{
"name": "google-it",
"version": "1.2.0",
"version": "1.2.1",
"description": "A CLI and Node.js library to help retrieve, display, and store Google search results",
"main": "./googleIt.js",
"bin": "./app.js",
"main": "./src/googleIt.js",
"bin": "./src/app.js",
"repository": {

@@ -12,2 +12,3 @@ "type": "git",

"scripts": {
"lint": "./node_modules/.bin/eslint --ext .js --ignore-path .eslintignore '*.js'",
"test": "mocha test/**/*.js"

@@ -31,2 +32,3 @@ },

"eslint": "^5.16.0",
"eslint-config-amex": "^10.1.0",
"mocha": "^5.0.0",

@@ -33,0 +35,0 @@ "prettier": "1.14.3"

@@ -13,3 +13,3 @@ # google-it [![Build Status](https://travis-ci.org/PatNeedham/google-it.svg?branch=master)](https://travis-ci.org/PatNeedham/google-it) [![Greenkeeper badge](https://badges.greenkeeper.io/PatNeedham/google-it.svg)](https://greenkeeper.io/) [![npm version](https://badge.fury.io/js/google-it.svg)](https://badge.fury.io/js/google-it)

![GIF of google-it](google-it-demo.gif?raw=true "google-it")
![GIF of google-it](./images/google-it-demo.gif?raw=true "google-it")

@@ -20,11 +20,11 @@ Prevent display in the terminal, and save results to a JSON file:

![GIF of google-it w/o display, results saved to file](google-it-output-no-display.gif?raw=true "google-it")
![GIF of google-it w/o display, results saved to file](./images/google-it-output-no-display.gif?raw=true "google-it")
`$ google-it --query="open whisper systems" -O 5`
![GIF of opening-in-browser](open-results-in-browser.gif?raw=true "google-it-to-browser")
![GIF of opening-in-browser](./images/open-results-in-browser.gif?raw=true "google-it-to-browser")
`$ google-it --query="mechanical turk" --only-urls`
![Screenshot of only-urls option](onlyUrls.png?raw=true "onlyUrls")
![Screenshot of only-urls option](./images/onlyUrls.png?raw=true "onlyUrls")

@@ -31,0 +31,0 @@ ### Command Line Arguments

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

var assert = require('assert')
var googleIt = require('../googleIt')
var validateCLIArguments = require('../validateCLIArguments')
var optionDefinitions = require('../optionDefinitions')
const assert = require('assert');
const googleIt = require('../src/googleIt');
const validateCLIArguments = require('../src/validateCLIArguments');

@@ -10,13 +9,13 @@ describe('Validate output file format', () => {

assert.equal(
validateCLIArguments({query: 'i dont know', output: 12345}).valid,
validateCLIArguments({ query: 'i dont know', output: 12345 }).valid,
false
)
})
})
);
});
});
describe('# -o whatever.jsonnn', () => {
it('should be invalid because output file must end with .json', () => {
assert.equal(
validateCLIArguments({query: 'blah', output: 'whatever.jsonnn'}).valid,
validateCLIArguments({ query: 'blah', output: 'whatever.jsonnn' }).valid,
false
)
);
});

@@ -27,7 +26,7 @@ });

assert.equal(
validateCLIArguments({'query': 'blah', 'no-display': true}).valid,
validateCLIArguments({ query: 'blah', 'no-display': true }).valid,
false
)
})
})
);
});
});
});

@@ -37,13 +36,13 @@

it('Should have results that exist', (done) => {
var options = {
"query": "Statue of liberty",
"no-display": true
}
googleIt(options).then(results => {
assert.notEqual(results, null, "Results must exist")
done()
}).catch(err => {
done(err)
})
})
})
const options = {
query: 'Statue of liberty',
'no-display': true,
};
googleIt(options).then((results) => {
assert.notEqual(results, null, 'Results must exist');
done();
}).catch((err) => {
done(err);
});
});
});

@@ -1,8 +0,8 @@

var googleIt = require('../googleIt')
/* eslint-disable no-console */
const googleIt = require('../src/googleIt');
googleIt({query: 'St. Vincent St. Mary Ohio', 'disableConsole': true}).then(results => {
googleIt({ query: 'St. Vincent St. Mary Ohio', disableConsole: true }).then((results) => {
// THIS console.log will display when running `node test/without_console_logs.js
// but the color-coded results will NOT display in the terminal
console.log('the results here: ' + JSON.stringify(results, null, 2))
})
console.log(`the results here: ${JSON.stringify(results, null, 2)}`);
});

Sorry, the diff of this file is not supported yet

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