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.1 to 1.2.2

4

CHANGELOG.md

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

##### v1.2.2 - 20160115
**Bugs**
- Fix logic regarding requiring files with duplicate naming
##### v0.2.1 - 20140210

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

20

lib/directory.js

@@ -97,8 +97,9 @@ 'use strict';

}
if (ext !== '' && !isValidExtension(ext)) {
return false;
}
try {
// remove the file extension and use require.resolve to resolve known
// file types eg. CoffeeScript. Will throw if not found/loadable by node.
file = ext ? file.slice(0, -ext.length) : file;
require.resolve(file);
require(file);
return true;

@@ -109,1 +110,12 @@ } catch (err) {

}
/**
* Returns true if `ext` is an extension with a registered handler
* in module.extensions.
* @param ext the file extension to check
* @returns {boolean}
*/
function isValidExtension(ext) {
var keys = Object.keys(require.extensions);
return keys.indexOf(ext) !== -1;
}
{
"name": "express-enrouten",
"version": "1.2.1",
"version": "1.2.2",
"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