Skip to content

Commit ee30306

Browse files
committed
fixed: controversies btw index.d.ts and readme.md
1 parent ca77fbb commit ee30306

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ declare const matcher: {
1616
It matches even across newlines. For example, `foo*r` will match `foo\nbar`.
1717
1818
@param inputs - String or array of strings to match.
19-
@param patterns - String or array of string patterns.
20-
@returns The `inputs` filtered based on the `patterns`.
19+
@param patterns - String or array of string patterns. Use `*` to match zero or more characters. A leading `!` negates the pattern.
20+
@returns An array of `inputs` filtered based on the `patterns`.
2121
2222
@example
2323
```
@@ -80,8 +80,8 @@ declare const matcher: {
8080
It matches even across newlines. For example, `foo*r` will match `foo\nbar`.
8181
8282
@param inputs - String or array of strings to match.
83-
@param patterns - String or array of string patterns. Use `*` to match zero or more characters. A pattern starting with `!` will be negated.
84-
@returns Whether any given `input` matches every given `pattern`.
83+
@param patterns - String or array of string patterns. Use `*` to match zero or more characters. A leading `!` negates the pattern.
84+
@returns Whether any of given `inputs` matches all the `patterns`.
8585
8686
@example
8787
```

readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ Accepts a string or an array of strings for both `inputs` and `patterns`.
8989

9090
Returns an array of `inputs` filtered based on the `patterns`.
9191

92-
### matcher.isMatch(input, pattern, options?)
92+
### matcher.isMatch(inputs, patterns, options?)
9393

9494
Accepts a string or an array of strings for both `inputs` and `patterns`.
9595

96-
Returns a `boolean` of whether any given `input` matches every given `pattern`.
96+
Returns a `boolean` of whether any of given `inputs` matches all the `patterns`.
9797

98-
#### input
98+
#### inputs
9999

100100
Type: `string | string[]`
101101

@@ -114,7 +114,7 @@ Treat uppercase and lowercase characters as being the same.
114114

115115
Ensure you use this correctly. For example, files and directories should be matched case-insensitively, while most often, object keys should be matched case-sensitively.
116116

117-
#### pattern
117+
#### patterns
118118

119119
Type: `string | string[]`
120120

0 commit comments

Comments
 (0)