Socket
Socket
Sign inDemoInstall

express-load

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-load - npm Package Compare versions

Comparing version 1.1.14 to 1.1.15

27

lib/express-load.js

@@ -73,2 +73,3 @@ /*!

var entity = this.__getEntity(loc);
var queue = [];

@@ -97,3 +98,3 @@ if (entity) {

if (allow && fs.statSync(script).isDirectory()) {
this.then(path.join(location, dir[file]));
queue.push(this.then.bind(this, path.join(location, dir[file])));
allow = false;

@@ -124,2 +125,9 @@ }

}
// If we have directories in queue to process, then process them now.
if (queue.length) {
for (var index in queue) {
queue[index]();
}
}
} else {

@@ -234,9 +242,12 @@ var location = path.dirname(location)

var notAsync = typeof mod !== 'function' || mod.length < 2;
if (!notAsync) {
mod = mod.call(script, instance, function () {
self.__log('Loaded *.' + map.join('.'));
next();
});
} else if (typeof mod === 'function') {
mod = mod.call(script, instance);
if (self.options.invoke !== false) {
if (!notAsync) {
mod = mod.call(script, instance, function () {
self.__log('Loaded *.' + map.join('.'));
next();
});
} else if (typeof mod === 'function') {
mod = mod.call(script, instance);
}
}

@@ -243,0 +254,0 @@

{
"name": "express-load",
"description": "Autoload modules into an Express application instance, config, models, routes, controllers etc...",
"version": "1.1.14",
"version": "1.1.15",
"author": {

@@ -6,0 +6,0 @@ "name": "Jarrad Seers",

# Express Load
## NOTE:
The successor to this module is here: [consign](https://www.npmjs.com/package/consign) it's not express specific and is lighter in weight. Check it out :)
The _express-load_ module provides the ability to load scripts into an Express instance from specified directories or files.

@@ -4,0 +7,0 @@ Make large express MVC applications easier to develop by allowing a logical file separation without having to require your scripts.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc