Socket
Socket
Sign inDemoInstall

require-dir

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

require-dir - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

.travis.yml

4

index.js

@@ -72,2 +72,6 @@ // requireDir.js

if (opts.recurse) {
if (base === 'node_modules') {
continue;
}
map[base] = requireDir(path, opts);

@@ -74,0 +78,0 @@

4

package.json
{ "name": "require-dir"
, "description": "Helper to require() directories."
, "version": "0.1.0"
, "version": "0.2.0"
, "author": "Aseem Kishore <aseem.kishore@gmail.com>"
, "license": "MIT"
, "dependencies": {}
, "devDependencies":
{ "coffee-script": "~1.3.3"
, "mkdirp": "^0.5.0"
}

@@ -9,0 +11,0 @@ , "engines":

@@ -0,1 +1,4 @@

[![Build Status](https://travis-ci.org/aseemk/requireDir.svg?branch=master)](https://travis-ci.org/aseemk/requireDir)
[![npm version](https://badge.fury.io/js/require-dir.svg)](http://badge.fury.io/js/require-dir)
# requireDir()

@@ -27,3 +30,4 @@

And if CoffeeScript was registered, `c.coffee` will also be returned.
And if CoffeeScript has been registered via `require('coffee-script/register')`,
`c.coffee` will also be returned.

@@ -57,2 +61,3 @@ ## Installation

`recurse`: Whether to recursively `require()` subdirectories too.
(`node_modules` within subdirectories will be ignored.)
Default is false.

@@ -110,2 +115,2 @@

MIT. &copy; 2012 Aseem Kishore.
MIT. &copy; 2012-2015 Aseem Kishore.

@@ -22,4 +22,10 @@ var assert = require('assert');

},
// note that node_modules was explicitly ignored
});
// finally, test that node_modules can still be required directly:
assert.deepEqual(requireDir('./recurse/node_modules'), {
fake: 'fake',
});
console.log('Recurse tests passed.');
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