|
20 | 20 | * [`search(tree, phrases, handler[, allowApostrophes|options])`](#searchtree-phrases-handler-allowapostrophesoptions)
|
21 | 21 | * [`Handler`](#handler)
|
22 | 22 | * [`Options`](#options)
|
23 |
| - * [`PhrasesList`](#phraseslist) |
24 | 23 | * [Types](#types)
|
25 | 24 | * [Compatibility](#compatibility)
|
26 | 25 | * [Related](#related)
|
@@ -113,6 +112,12 @@ There is no default export.
|
113 | 112 |
|
114 | 113 | Search for phrases in a tree.
|
115 | 114 |
|
| 115 | +Each phrase is a space-separated list of words, where each word will be |
| 116 | +[normalized][nlcst-normalize] to remove casing, apostrophes, and dashes. |
| 117 | +Spaces in a pattern mean one or more whitespace nodes in the tree. |
| 118 | +Instead of a word with letters, it’s also possible to use a wildcard symbol |
| 119 | +(`*`, an asterisk) which will match any word in a pattern (`alpha * charlie`). |
| 120 | + |
116 | 121 | ##### Parameters
|
117 | 122 |
|
118 | 123 | * `tree` ([`Node`][node])
|
@@ -162,29 +167,11 @@ Configuration (TypeScript type).
|
162 | 167 | * `allowLiterals` (`boolean`, default: `false`)
|
163 | 168 | — include [literal][] phrases
|
164 | 169 |
|
165 |
| -### `PhrasesList` |
166 |
| - |
167 |
| -List of phrases (TypeScript type). |
168 |
| - |
169 |
| -Each phrase is a space-separated list of words, where each word will be |
170 |
| -[normalized][nlcst-normalize] to remove casing, apostrophes, and dashes. |
171 |
| -Spaces in a pattern mean one or more whitespace nodes in the tree. |
172 |
| -Instead of a word with letters, it’s also possible to use a wildcard symbol |
173 |
| -(`*`, an asterisk) which will match any word in a pattern (`alpha * charlie`). |
174 |
| - |
175 |
| -###### Type |
176 |
| - |
177 |
| -```ts |
178 |
| -type PhrasesList = Array<string> |
179 |
| -``` |
180 |
| -
|
181 | 170 | ## Types
|
182 | 171 |
|
183 | 172 | This package is fully typed with [TypeScript][].
|
184 |
| -It exports the additional types |
185 |
| -[`Handler`][api-handler], |
186 |
| -[`Options`][api-options], and |
187 |
| -[`PhrasesList`][api-phrases-list]. |
| 173 | +It exports the additional types [`Handler`][api-handler] and |
| 174 | +[`Options`][api-options]. |
188 | 175 |
|
189 | 176 | ## Compatibility
|
190 | 177 |
|
@@ -278,5 +265,3 @@ abide by its terms.
|
278 | 265 | [api-handler]: #handler
|
279 | 266 |
|
280 | 267 | [api-options]: #options
|
281 |
| -
|
282 |
| -[api-phrases-list]: #phraseslist |
0 commit comments