Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-enrouten

Package Overview
Dependencies
Maintainers
4
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-enrouten - npm Package Compare versions

Comparing version 1.2.3 to 1.3.0

4

CHANGELOG.md

@@ -0,1 +1,5 @@

##### v1.3.0 - 20160129
**Features**
- Add support for babel 6 transformed controllers wth default export
##### v1.2.3 - 20160129

@@ -2,0 +6,0 @@ **Bugs**

22

lib/directory.js

@@ -56,10 +56,7 @@ 'use strict';

return function handler(basedir, ancestors, current) {
var abs, impl, filename, mountpath, subrouter;
var abs, impl, filename;
abs = path.join(basedir, ancestors, current);
filename = path.basename(current, path.extname(current));
function mount(impl, filename) {
var mountpath, subrouter;
if (isFileModule(abs)) {
impl = require(abs);
if (typeof impl === 'function' && impl.length === 1) {

@@ -75,4 +72,17 @@ // Build current pount path, ignoring `index` in lieu of `/`

router.use(mountpath, subrouter._router);
return true;
}
}
abs = path.join(basedir, ancestors, current);
filename = path.basename(current, path.extname(current));
if (isFileModule(abs)) {
impl = require(abs);
if (!mount(impl, filename)) {
if (impl && impl.default) {
mount(impl.default, filename);
}
}
}
};

@@ -79,0 +89,0 @@

@@ -16,2 +16,7 @@ 'use strict';

module = require(file);
if (typeof module === 'object' && module.default) {
module = module.default;
}
assert.equal(typeof module, 'function', 'An index file must export a function.');

@@ -18,0 +23,0 @@ assert.equal(module.length, 1, 'An index file must export a function that accepts a single argument.');

{
"name": "express-enrouten",
"version": "1.2.3",
"version": "1.3.0",
"description": "An express route initialization and configuration module.",

@@ -5,0 +5,0 @@ "main": "index.js",

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