Socket
Socket
Sign inDemoInstall

detective

Package Overview
Dependencies
14
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.0 to 4.0.0

bench/detect.js

20

index.js

@@ -1,2 +0,18 @@

var esprima = require('esprima-fb');
var aparse = require('acorn').parse;
var defined = require('defined');
function parse (src, opts) {
if (!opts) opts = {};
return aparse(src, {
ecmaVersion: defined(opts.ecmaVersion, 6),
ranges: defined(opts.ranges, opts.range),
locations: defined(opts.locations, opts.loc),
allowReturnOutsideFunction: defined(
opts.allowReturnOutsideFunction, true
),
strictSemicolons: defined(opts.strictSemicolons, false),
allowTrailingCommas: defined(opts.allowTrailingCommas, true),
forbidReserved: defined(opts.forbidReserved, false)
});
}
var escodegen = require('escodegen');

@@ -25,3 +41,3 @@

var walk = function (src, opts, cb) {
var ast = esprima.parse(src, opts);
var ast = parse(src, opts);
traverse(ast, cb);

@@ -28,0 +44,0 @@ };

7

package.json
{
"name": "detective",
"description": "find all require() calls by walking the AST",
"version": "3.1.0",
"version": "4.0.0",
"repository": {

@@ -20,4 +20,5 @@ "type": "git",

"dependencies": {
"escodegen": "~1.1.0",
"esprima-fb": "3001.1.0-dev-harmony-fb"
"acorn": "~0.9.0",
"defined": "0.0.0",
"escodegen": "^1.4.1"
},

@@ -24,0 +25,0 @@ "devDependencies": {

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

var a = require('a');
var b = yield require('c')(a);
(function * () {
var a = require('a');
var b = yield require('c')(a);
})();

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc