Nutella with Pepperoni and Mushrooms
Publish your own packages to the world's most popular software ecosystem with npm Pro.Get started »

entire-folder

0.1.0 • Public • Published

entire-folder Build Status

Allows you to require() all of the modules in a folder.

npm install entire-folder

Usage

Suppose there is a folder called myFolder/ in the current directory. It contains the files file1.js, file2.js, and file3.js.

var folder = require('entire-folder')('myFolder');
console.log(folder);
/* => {
  file1: "file1's exports would be here",
  file2: "file2's exports would be here",
  file3: "file3's exports would be here"
*/

Install

npm i entire-folder

DownloadsWeekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • avatar