New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

directory-import

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

directory-import - npm Package Compare versions

Comparing version

to
1.0.2

{
"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