Comparing version 0.0.5 to 0.0.6
@@ -39,3 +39,3 @@ 'use strict' | ||
if (match) { | ||
if (match && !(stats.isDirectory() && options.nodir)) { | ||
yield options.absolute ? absoluteEntryPath : relativeEntryPath | ||
@@ -42,0 +42,0 @@ } |
{ | ||
"name": "it-glob", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Async iterable filename pattern matcher", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -24,2 +24,3 @@ # it-glob | ||
absolute // return absolute paths, defaults to false | ||
nodir // only yield file paths, skip directories | ||
@@ -26,0 +27,0 @@ // all other options are passed to minimatch |
@@ -83,3 +83,14 @@ import test from 'ava' | ||
t.truthy(files.includes('node_modules/@ava')) | ||
t.truthy(files.includes('node_modules/ava')) | ||
}) | ||
test('it skips directories', async t => { | ||
const dir = path.resolve(__dirname, '..') | ||
const files = await all(glob(dir, 'node_modules/**/*', { | ||
nodir: true | ||
})) | ||
t.falsy(files.includes('node_modules/ava')) | ||
t.truthy(files.includes('node_modules/ava/package.json')) | ||
}) |
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
4667
107
33