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 modules

  • 0.0.6
  • Source
  • npm
  • Socket score

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

require-plus Build Status

Node module for loading js files via require when supplied with a valid directory, if the directory is not valid it will throw. It will also throw if the object is not exported properly or cannot be resolved through require.

##Installation

npm install require-plus

##Usage

var Plus = require('require-plus');
var options : {
    blacklist: ['node_modules', '.git', '.idea'],
    extensions: ['.js','.json']
};
// if options are not set the standard defaults shown above will be applied, however you must include a directory string in options object which is passed to constructor
options.directory = './test';
var results = new Plus(options);
console.log(results);
//results will contain a moduleSet object (tree of required objects created by constructor), settings (options object passed to constructor) and root (root directory which object tree is built from)

##Todo

  • 100% code coverage
  • Handle require errors better

Keywords

FAQs

Package last updated on 13 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