Socket
Socket
Sign inDemoInstall

module-definition

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

module-definition - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

12

index.js

@@ -5,12 +5,2 @@ var Walker = require('node-source-walk'),

// Allows us to differentiate from the funky commonjs case
function hasAMDArguments(requireNode) {
var args = requireNode.arguments;
return args &&
args[0].type !== 'Literal' &&
// For some dynamic node requires
args[0].type !== 'Identifier';
}
function fromSource(source) {

@@ -40,3 +30,3 @@ if (typeof source === 'undefined') throw new Error('source not supplied');

if (types.isTopLevelRequire(node) && hasAMDArguments(node)) {
if (types.isAMDDriverScriptRequire(node)) {
hasAMDTopLevelRequire = true;

@@ -43,0 +33,0 @@ }

4

package.json
{
"name": "module-definition",
"version": "1.2.3",
"version": "1.2.4",
"description": "Determines if a file is using a CommonJS or AMD module definition",

@@ -20,3 +20,3 @@ "main": "index.js",

"dependencies": {
"ast-module-types": "^1.1.1",
"ast-module-types": "^1.2.0",
"node-source-walk": "^1.1.0"

@@ -23,0 +23,0 @@ },

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