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

requireindex

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

requireindex - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

15

index.js

@@ -35,14 +35,15 @@ var FS = require('fs');

files.forEach(function (filename) {
// ignore index.js and files prefixed with underscore and
if ((filename === 'index.js') || (filename[0] === '_') || (filename[0] === '.')) {
return;
// ignore index.js and files prefixed with underscore and
if ((filename === 'index.js') || (filename[0] === '_') || (filename[0] === '.')) {
return;
}
var filepath = Path.resolve(Path.join(dir, filename));
var ext = Path.extname(filename);
var stats = FS.statSync(filepath);
// don't require non-javascript files (.txt .md etc.)
if (stats.isFile() && !(ext in require.extensions)) {
return;
var exts = ['.js', '.node', '.json'];
if (stats.isFile() && (exts.indexOf(ext) === -1)) {
return;
}

@@ -49,0 +50,0 @@

{
"name": "requireindex",
"description": "Write minimal node index.js files that require and export siblings by file basename",
"version": "1.1.0",
"license" : "MIT",
"version": "1.2.0",
"license": "MIT",
"main": "index.js",
"repository": {

@@ -12,7 +11,5 @@ "type": "git",

},
"scripts": {
"test": "node test/test.js"
},
"keywords": [

@@ -23,25 +20,16 @@ "require",

],
"directories" : {
"lib" : ".",
"test" : "test"
"directories": {
"test": "test"
},
"bugs": {
"url" : "http://github.com/stephenhandley/requireindex/issues"
"url": "http://github.com/stephenhandley/requireindex/issues"
},
"engines" : {
"node" : ">=0.10.5"
"engines": {
"node": ">=0.10.5"
},
"devDependencies": {
"asserts": "4.0.x"
},
"author": {
"name": "Stephen Handley",
"email": "stephen.handley@gmail.com",
"url": "http://person.sh"
}
}
"author": "Stephen Handley <stephen.handley@gmail.com> (http://person.sh)",
"homepage": "https://github.com/stephenhandley/requireindex"
}

@@ -7,3 +7,3 @@ # Description

1.1.0
1.2.0

@@ -91,2 +91,2 @@ # Installation

#Build status
[![build status](https://secure.travis-ci.org/stephenhandley/requireindex.png)](http://travis-ci.org/stephenhandley/requireindex)
[![build status](https://secure.travis-ci.org/stephenhandley/requireindex.png)](http://travis-ci.org/stephenhandley/requireindex)
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