New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

require-plus

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

require-plus

better require for directories

  • 2.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by66.67%
Maintainers
1
Weekly downloads
 
Created
Source

require-plus

build status Current Version dependency Status devDependency Status Coveralls

Node module for requiring a directory tree, it will throw if not a valid directory and it will also throw if the object is not exported properly or cannot be required by require.

##Installation

npm install require-plus

##Usage

const options = {
    blacklist: ['node_modules', '.git', '.idea'],
    extensions: ['.js','.json'],
    directory: ['./test', './some/path', './some/other/path'] // can be a string or an array
};

const plus = require('require-plus')(options);
console.log(plus);
//plus is an object containing modules exported from above directories

##Todo

  • 100% code coverage
  • Handle require errors better
  • Add silent error handling option to not throw if something cannot be required by require

Keywords

FAQs

Package last updated on 28 Apr 2018

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