Package Exports
- req-all
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (req-all) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
req-all 
Require all files in a directory
This module is intentionally simple. Not interested in more features.
Install
$ npm install --save req-allUsage
.
└── dir
├── foo-bar.js
└── baz-faz.jsconst reqAll = require('req-all');
const modules = reqAll('dir');
console.log(modules);
//=> {fooBar: [Function], bazFaz: [Function]}API
reqAll([directory], [options])
directory
Type: string
Default: __dirname
Directory to require supported files in. Unless you've modified require.extensions, that means any .js, .json, .node files, in that order. Does not recurse. Ignores the caller file and files starting with . or _.
options
Type: Object
camelize
Type: boolean
Default: true
Convert dash-style names (foo-bar) to camel-case (fooBar).
License
MIT © Sindre Sorhus