Socket
Socket
Sign inDemoInstall

detective

Package Overview
Dependencies
2
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.3.0 to 4.3.1

14

index.js

@@ -46,5 +46,8 @@ var acorn = require('acorn');

walk.simple(ast, {
CallExpression: function (node) {
if (!isRequire(node)) return;
function visit(node, st, c) {
var hasRequire = wordRe.test(src.slice(node.start, node.end));
if (!hasRequire) return;
walk.base[node.type](node, st, c);
if (node.type !== 'CallExpression') return;
if (isRequire(node)) {
if (node.arguments.length) {

@@ -61,2 +64,7 @@ var arg = node.arguments[0];

}
}
walk.recursive(ast, null, {
Statement: visit,
Expression: visit
});

@@ -63,0 +71,0 @@

{
"name": "detective",
"description": "find all require() calls by walking the AST",
"version": "4.3.0",
"version": "4.3.1",
"repository": {

@@ -6,0 +6,0 @@ "type": "git",

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