Socket
Socket
Sign inDemoInstall

needs

Package Overview
Dependencies
4
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    needs

Require multiple modules in node.js.


Version published
Weekly downloads
13
increased by30%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Needs

NPM Version Build Status Dependencies

Require multiple modules in node.js.

Installation

$ npm install yetta

##Usage

var controllers = require('needs')(__dirname, 'controllers', {
	includes: /(.+Controller)\.js$/,
	excludes: /^\.(git|svn)$/
});

// controllers now is an object with references to all modules matching the filter
// for example:
// { HomeController: function HomeController() {...}, ...}

or:

var libs = require('needs')(__dirname, 'libs');

or:

var libs = require('needs')(__dirname + '/libs');

##Links

License

Copyright (c) 2014 Tao Yuan Licensed under the MIT license.

Keywords

FAQs

Last updated on 25 Aug 2014

Did you know?

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc