glob style matching on iterables
import { matcher } from "matching-iterator";
for await (const r of matcher([
{ name: "a" },{ name: "b" }], "a*", { name: "name" })) {
console.log(r);
}
Match entries against glob pattern.
Returns Iterable<(string | Object)> filtered entries
Match entries against glob pattern.
Returns AsyncGenerator<(string | Object)> filtered entries
Returns any globs copiled into regex
With npm do:
npm install matching-iterator
BSD-2-Clause