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

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.1 to 1.2.2

test/h.js

2

index.js

@@ -16,3 +16,3 @@ var Walker = require('node-source-walk'),

function fromSource(source) {
if (! source) throw new Error('source not supplied');
if (typeof source === 'undefined') throw new Error('source not supplied');

@@ -19,0 +19,0 @@ var type = 'none',

{
"name": "module-definition",
"version": "1.2.1",
"version": "1.2.2",
"description": "Determines if a file is using a CommonJS or AMD module definition",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -0,1 +1,3 @@

# module-definition [![npm](http://img.shields.io/npm/v/module-definition.svg)](https://npmjs.org/package/module-definition) [![npm](http://img.shields.io/npm/dm/module-definition.svg)](https://npmjs.org/package/module-definition)
Determines the module definition type (CommonJS, AMD, or none) for a given JavaScript file

@@ -2,0 +4,0 @@ by walking through the AST.

@@ -43,2 +43,3 @@ var getModuleType = require('../');

asyncTest("./g.js", "commonjs");
asyncTest("./h.js", "none");

@@ -66,2 +67,3 @@ it('throws if the filename is not supplied', function() {

syncTest("./g.js", "commonjs");
syncTest("./h.js", "none");

@@ -81,2 +83,3 @@ it('throws if the filename is not supplied', function() {

sourceTest("./g.js", "commonjs");
sourceTest("./h.js", "none");

@@ -83,0 +86,0 @@ it('throws if source code is not supplied', function() {

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