Socket
Socket
Sign inDemoInstall

commonjs-walker

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commonjs-walker - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

8

index.js

@@ -33,3 +33,3 @@ 'use strict';

defaultTrue(options, 'detectCircular');
defaultTrue(options, 'detectCyclic');
defaultTrue(options, 'strictRequire');

@@ -143,3 +143,3 @@

if (
options.detectCircular
options.detectCyclic

@@ -151,3 +151,3 @@ // node -> sub_node

code: 'ECIRCULAR',
message: 'Circular dependency found: \n' + self._printCircular(circular_trace),
message: 'Cyclic dependency found: \n' + self._printCyclic(circular_trace),
data: {

@@ -242,3 +242,3 @@ trace: circular_trace,

//
Walker.prototype._printCircular = function(trace) {
Walker.prototype._printCyclic = function(trace) {
var list = trace.map(function (node, index) {

@@ -245,0 +245,0 @@ return index + 1 + ': ' + node.id;

{
"name": "commonjs-walker",
"version": "1.0.3",
"version": "1.0.4",
"description": "Analyzer and tree walker for commonjs.",

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

@@ -93,3 +93,3 @@ # commonjs-walker [![NPM version](https://badge.fury.io/js/commonjs-walker.png)](http://badge.fury.io/js/commonjs-walker) [![Build Status](https://travis-ci.org/kaelzhang/node-commonjs-walker.png?branch=master)](https://travis-ci.org/kaelzhang/node-commonjs-walker)

------ | ---- | ------- | ------------
detectCircular | `Boolean` | true | whether should check circular dependencies
detectCyclic | `Boolean` | true | whether should check cyclic dependencies
strictRequire | `Boolean` | true | whether should check the usage of method `require()`

@@ -96,0 +96,0 @@

@@ -41,3 +41,3 @@ 'use strict';

options: {
detectCircular: false
detectCyclic: false
},

@@ -44,0 +44,0 @@ file: 'circular/index.js',

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