Socket
Socket
Sign inDemoInstall

detective-cjs

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detective-cjs - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

LICENSE

12

index.js

@@ -12,9 +12,6 @@ 'use strict';

const walker = new Walker();
const dependencies = [];
walker.walk(content, function(node) {
if (!types.isRequire(node) ||
!node.arguments ||
!node.arguments.length) {
walker.walk(content, (node) => {
if (!types.isRequire(node) || !node.arguments || node.arguments.length === 0) {
return;

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

}
});

@@ -41,3 +37,5 @@

return node.arguments[0].value;
} else if (node.arguments[0].type === 'TemplateLiteral') {
}
if (node.arguments[0].type === 'TemplateLiteral') {
return node.arguments[0].quasis[0].value.raw;

@@ -44,0 +42,0 @@ }

{
"name": "detective-cjs",
"version": "3.1.1",
"version": "3.1.2",
"description": "Get the dependencies of a CommonJS module by traversing its AST",
"main": "index.js",
"files": [
"index.js"
],
"scripts": {
"test": "jscs index.js test && mocha test/test.js"
"lint": "eslint index.js \"test/*.js\"",
"mocha": "mocha",
"test": "npm run lint && npm run mocha"
},
"repository": {
"type": "git",
"url": "https://github.com/mrjoelkemp/node-detective-cjs.git"
"url": "https://github.com/dependents/node-detective-cjs.git"
},

@@ -25,18 +30,16 @@ "keywords": [

"bugs": {
"url": "https://github.com/mrjoelkemp/node-detective-cjs/issues"
"url": "https://github.com/dependents/node-detective-cjs/issues"
},
"homepage": "https://github.com/mrjoelkemp/node-detective-cjs",
"homepage": "https://github.com/dependents/node-detective-cjs",
"engines": {
"node": ">= 6.0"
"node": ">=6.0"
},
"devDependencies": {
"jscs": "^3.0.7",
"jscs-preset-mrjoelkemp": "~2.0.0",
"mocha": "^5.2.0",
"sinon": "^6.1.5"
},
"dependencies": {
"ast-module-types": "^2.4.0",
"node-source-walk": "^4.0.0"
},
"devDependencies": {
"eslint": "^5.16.0",
"mocha": "^6.2.3"
}
}
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