Socket
Socket
Sign inDemoInstall

express-load

Package Overview
Dependencies
0
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

2

examples/simple/app.js
var express = require('express');
var load = require('express-load');
var load = require('../../');

@@ -4,0 +4,0 @@ var app = express();

@@ -16,5 +16,5 @@ module.exports = function(app) {

user.isAuthenticated,
site.controllers.index
site.index
);
};

@@ -0,1 +1,9 @@

0.0.3 / 2012-08-08
==================
* Ignore directories
* Fixed simple example
* Updated package.json
0.0.2 / 2012-08-07

@@ -2,0 +10,0 @@ ==================

@@ -69,9 +69,14 @@ /*!

files.forEach(function(file) {
var filename = path.basename(file, path.extname(file));
var script = require(path.join(dir, file));
if (typeof script === 'function') {
script = script(that.app);
var filename = path.basename(file, path.extname(file))
, fullpath = path.join(dir, file)
if (!fs.statSync(fullpath).isDirectory()) {
var script = require(fullpath);
if (typeof script === 'function') {
script = script(that.app);
}
that.app[name][filename] = script;
console.log('%s: Loaded app.%s.%s', title, name, filename);
}
that.app[name][filename] = script;
console.log('%s: Loaded %s in %s as app.%s.%s', title, file, dir, name, filename);
});

@@ -89,2 +94,2 @@ }

return new ExpressLoad(dir, app);
};
};
{
"name": "express-load",
"description": "Load files in a directory with the Express application instance",
"version": "0.0.2",
"description": "Autoload modules into an Express application instance",
"version": "0.0.3",
"author": {

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc