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

directory

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

directory

require everything in a directory

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

directory

Build Status

require all files and directories inside a directory synchronously

Example

Any of the below


// return an object hash
var dir = require('directory')

// or pass a callback
require('directory')(function (module, name) {
  exports[name] = module
})

// or pass a different path
var dir = require('directory')(__dirname +'/../plugins/')

// or pass both
var dir = require('directory')(__dirname +'/plugins/', function (module, name) {
  exports[name] = module
})

Installation

npm install directory

Usage

require('directory')([dirname, iterator])

Tests

npm install mocha -g and make test

License

MIT

FAQs

Package last updated on 06 May 2012

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