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

require-list

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

require-list

require tree list

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Require List

Required children tree.

Installation

npm install -g require-list

Command

rlist

Example
Case 1

a.js

require('./b');
console.log('done: a');

b.js

require('./c');
console.log('done: b');

c.js

console.log('done: c');

command

$ rlist -e a.js
done: c
done: b
done: a
./a.js
   ├─ ./b.js
   |   ├─ ./c.js
Case 2

a.js

setTimeout(function() {
  require('./b');
}, 1000);
console.log('done: a');

b.js

require('./c');
console.log('done: b');

c.js

console.log('done: c');

bad command

$ rlist -e a.js
done: a
./a.js

good command

$ rlist -e a.js -w 1000
done: a
done: c
done: b
./a.js
   ├─ ./b.js
   |   ├─ ./c.js
Case 3

a.js

if (process.argv.length < 4) {
  console.log('unknown option "-c --config <path>"');
  process.exit(1);
}
require('./b');
console.log('done: a');

b.js

require('./c');
console.log('done: b');

c.js

console.log('done: c');

bad command

$ rlist -e a.js
unknown option "-c --config <path>"

good command

$ rlist -e a.js -a '-c conf/local.json'
done: c
done: b
done: a
./a.js
   ├─ ./b.js
   |   ├─ ./c.js

Test

Run npm test and npm run-script jshint

FAQs

Package last updated on 11 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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