Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
GlobIgnore.prototype._readdir = function _readdir(
abs: string,
inGlobStar: boolean,
cb: GlobCallback
) {
const marked = this._mark(abs);
const rel = relative(this.cwd, marked);
if (rel && this[IGNORE] && this[IGNORE](rel)) {
return cb(null);
}
// @ts-ignore
Glob.prototype._readdir.call(
this,
abs,
inGlobStar,
(err: Error, results?: string[]): void => {
if (err) return cb(err);
cb(
null,
results && results.filter(r => !(this[IGNORE] && this[IGNORE](r)))
);
}
);
};