Comparing version 0.0.13 to 0.0.14
12
index.js
@@ -53,6 +53,6 @@ 'use strict' | ||
async function * _glob (base, dir, pattern, options) { | ||
for await (const entry of await fs.readdir(path.join(base, dir))) { | ||
const relativeEntryPath = path.join(dir, entry) | ||
const absoluteEntryPath = path.join(base, dir, entry) | ||
const stats = await fs.stat(absoluteEntryPath) | ||
for await (const entry of await fs.opendir(path.join(base, dir))) { | ||
const relativeEntryPath = path.join(dir, entry.name) | ||
const absoluteEntryPath = path.join(base, dir, entry.name) | ||
let match = minimatch(relativeEntryPath, pattern, options) | ||
@@ -66,7 +66,7 @@ | ||
if (match && !(stats.isDirectory() && options.nodir)) { | ||
if (match && !(entry.isDirectory() && options.nodir)) { | ||
yield options.absolute ? absoluteEntryPath : relativeEntryPath | ||
} | ||
if (stats.isDirectory()) { | ||
if (entry.isDirectory()) { | ||
yield * _glob(base, relativeEntryPath, pattern, options) | ||
@@ -73,0 +73,0 @@ } |
{ | ||
"name": "it-glob", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "Async iterable filename pattern matcher", | ||
@@ -36,3 +36,3 @@ "main": "index.js", | ||
"types": "dist/index.d.ts", | ||
"gitHead": "75da81c91765b2af8ecdd0fcb21868278d47907f" | ||
"gitHead": "db98c14fcd41e4f17385c31d355f76f9050fa985" | ||
} |
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
7577
173