include-all
Advanced tools
Comparing version 0.0.0 to 0.0.1
@@ -8,3 +8,6 @@ var fs = require('fs'); | ||
try { files = fs.readdirSync(options.dirname); } | ||
catch (e) { return false; } | ||
catch (e) { | ||
if (options.optional) return {}; | ||
else throw new Error('Directory not found: ' + options.dirname); | ||
} | ||
@@ -11,0 +14,0 @@ function excludeDirectory(dirname) { |
{ | ||
"name": "include-all", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "An easy way to include all (or require all) files within a directory. Note: This is a fork of felixge's require-all which returns false instead of throwing an error if the directory doesn't exist. This allows for optional includes, and relieves you from having to wrap the call to require-all in a try/catch.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4565
102
35