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

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.3.0 to 0.3.1

test/simple/e.ts

6

index.js

@@ -106,2 +106,8 @@ // requireDir.js

if (path) {
// ignore TypeScript declaration files. They should never be
// `require`d
if (/\.d\.ts$/.test(path)) {
continue;
}
// if duplicates are wanted, key off the full name always, and

@@ -108,0 +114,0 @@ // also the base if it hasn't been taken yet (since this ext

4

package.json
{ "name": "require-dir"
, "description": "Helper to require() directories."
, "version": "0.3.0"
, "version": "0.3.1"
, "author": "Aseem Kishore <aseem.kishore@gmail.com>"

@@ -10,2 +10,4 @@ , "license": "MIT"

, "mkdirp": "^0.5.0"
, "ts-node": "^1.3.0"
, "typescript": "^1.8.0"
}

@@ -12,0 +14,0 @@ , "engines":

@@ -20,2 +20,12 @@ var assert = require('assert');

// now register TypeScript and do it again:
// note that we include typescript files but not declarations.
require('ts-node/register');
assert.deepEqual(requireDir('./simple'), {
a: 'a',
b: 'b',
c: 'c',
e: 'e',
});
console.log('Simple tests passed.');

Sorry, the diff of this file is not supported yet

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