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

acquire

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acquire

Require all modules from the node_modules directory, using Node module resolution algorithm to discover it

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

npm

acquire

Build Status Dependency Status

Using Node module resolution algorithm, discover node_modules directory and require or require.resolve all modules in it.

API

acquire(basedir, [opts])

Require all modules in node_modules, starting from the basedir.

Returns object of all the modules required:

{
  foo: require(path_to_foo),
  bar: require(path_to_bar)
}
OptionTypeRequired?Default
depthnumberNo1
skipFailuresbooleanNofalse

If opts.depth is finite, it specifies the number of node_modules directories up the directory tree to traverse into. If opts.depth is Infinity, traversal ends at the file system root.

opts.skipFailures skips modules that fail to require() (e.g. plugins for Grunt).

acquire.resolve(basedir, [opts])

Require.resolve all modules in node_modules, starting from the basedir.

Returns object of all the modules and corresponding paths:

{
  foo: path_to_foo,
  bar: path_to_bar
}

Install

npm install acquire

License

MIT

Keywords

FAQs

Package last updated on 03 Apr 2015

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