load-from-directory
v1.1.0
Published
Loads all modules from the given directory into an array
Downloads
124
Maintainers
Readme
load-from-directory
Loads all nodejs modules from the given directory into an array
Usage
Filetree:
- index.js
- test_directory/
- test.js
test.js:
module.exports = 'test_string_in_file'
index.js:
var load_from_directory = require( 'load_from_directory' );
var loaded = load_from_directory.load( 'test_directory' );
console.log( loaded );
Output:
{
"test": "test_string_in_file"
}