2.1.3 • Published 1 year 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
1 year ago
2.1.2
1 year ago
2.1.1
1 year ago
2.1.0
1 year ago
2.0.12
2 years ago
2.0.11
2 years ago
2.0.9
3 years ago
2.0.10
3 years ago
2.0.8
3 years ago
2.0.5
3 years ago
2.0.7
3 years ago
2.0.6
3 years ago
2.0.4
3 years ago
2.0.3
3 years ago
2.0.2
3 years ago
2.0.1
3 years ago
2.0.0
4 years ago
1.1.5
4 years ago
1.1.4
4 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.0
5 years ago