2.1.3 • Published 3 months ago
matching-iterator v2.1.3
matching-iterator
glob style matching on iterables
usage
import { matcher } from "matching-iterator";
for await (const r of matcher([
{ name: "a" },{ name: "b" }], "a*", { name: "name" })) {
console.log(r);
}
API
Table of Contents
matcher
Match entries against glob pattern.
Parameters
entries
Iterable<(string | Object)> inputpatterns
(Array[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | string | undefined) filter to applyoptions
Object (optional, default{}
)
Returns Iterable<(string | Object)> filtered entries
asyncMatcher
Match entries against glob pattern.
Parameters
entries
Iterable<(string | Object)> inputpatterns
(Array[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | string | undefined) filter to applyoptions
Object (optional, default{}
)
Returns AsyncGenerator<(string | Object)> filtered entries
compile
Parameters
patterns
(Array[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | string)options
Object
Returns any globs copiled into regex
install
With npm do:
npm install matching-iterator
license
BSD-2-Clause
2.1.3
3 months ago
2.1.2
3 months ago
2.1.1
3 months ago
2.1.0
3 months ago
2.0.12
12 months ago
2.0.11
1 year ago
2.0.9
1 year ago
2.0.10
1 year ago
2.0.8
2 years ago
2.0.5
2 years ago
2.0.7
2 years ago
2.0.6
2 years ago
2.0.4
2 years ago
2.0.3
2 years ago
2.0.2
2 years ago
2.0.1
2 years ago
2.0.0
3 years ago
1.1.5
3 years ago
1.1.4
3 years ago
1.1.3
3 years ago
1.1.2
4 years ago
1.1.1
4 years ago
1.1.0
4 years ago
1.0.0
4 years ago