Comparing version 0.1.3 to 0.1.4
11
index.js
@@ -25,3 +25,2 @@ 'use strict'; | ||
opts.path = Array.isArray(opts.path) ? opts.path : [opts.path]; | ||
opts.exclude = Array.isArray(opts.exclude) ? opts.exclude : [opts.exclude]; | ||
opts.global = opts.global !== false; | ||
@@ -33,4 +32,12 @@ | ||
if (opts.exclude) { | ||
opts.exclude = Array.isArray(opts.exclude) ? opts.exclude : [opts.exclude]; | ||
} | ||
file = opts.path.map(function (dir) { | ||
if (dir && dir.indexOf(opts.exclude) === -1) { | ||
if (dir && opts.exclude) { | ||
if (dir.indexOf(opts.exclude) === -1) { | ||
return path.join(dir, name); | ||
} | ||
} else if (dir) { | ||
return path.join(dir, name); | ||
@@ -37,0 +44,0 @@ } |
{ | ||
"name": "find-file", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Search for a file in an array of paths", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
2945
41