directory-import
Advanced tools
{ | ||
"name": "directory-import", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Module sync or async import(requires) all modules from the folder you specify.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -71,5 +71,5 @@ ##### Module sync or async import(requires) all modules from the folder you specify. | ||
// Loading and storing modules in the object | ||
const modules = importDir(`./someDir`, 'sync'); | ||
const modulesSync = importDir(`./someDir`, 'sync'); | ||
console.info(modules); | ||
console.info(modulesSync); | ||
// { | ||
@@ -86,7 +86,7 @@ // someFile1: [Function], | ||
// However, modules load in order from fastest loaded to slowest loaded | ||
const filesIntoDirAsync = readdir.async('./someDir'); | ||
const modulesAsync = importDir(`./someDir`, 'async'); | ||
setTimeout(() => { | ||
console.info(filesIntoDirAsync); | ||
console.info(modulesAsync); | ||
}, 1000); | ||
@@ -93,0 +93,0 @@ ``` |
Sorry, the diff of this file is not supported yet
26798
4.34%