|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
949 bytes
|
| Line | |
|---|
| 1 | /**
|
|---|
| 2 | * Splits `string` into an array of its words.
|
|---|
| 3 | *
|
|---|
| 4 | * @param {string | object} str - The string or object that is to be split into words.
|
|---|
| 5 | * @param {RegExp | string} [pattern] - The pattern to match words.
|
|---|
| 6 | * @returns {string[]} - Returns the words of `string`.
|
|---|
| 7 | *
|
|---|
| 8 | * @example
|
|---|
| 9 | * const wordsArray1 = words('fred, barney, & pebbles');
|
|---|
| 10 | * // => ['fred', 'barney', 'pebbles']
|
|---|
| 11 | *
|
|---|
| 12 | */
|
|---|
| 13 | declare function words(string?: string, pattern?: string | RegExp): string[];
|
|---|
| 14 | /**
|
|---|
| 15 | * Splits `string` into an array of its words.
|
|---|
| 16 | *
|
|---|
| 17 | * @param {string | object} str - The string or object that is to be split into words.
|
|---|
| 18 | * @param {RegExp | string} [pattern] - The pattern to match words.
|
|---|
| 19 | * @returns {string[]} - Returns the words of `string`.
|
|---|
| 20 | *
|
|---|
| 21 | * @example
|
|---|
| 22 | * const wordsArray1 = words('fred, barney, & pebbles');
|
|---|
| 23 | * // => ['fred', 'barney', 'pebbles']
|
|---|
| 24 | */
|
|---|
| 25 | declare function words(string: string, index: string | number, guard: object): string[];
|
|---|
| 26 |
|
|---|
| 27 | export { words };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.