MultiLoader-Template/node_modules/es-toolkit/dist/compat/string/words.d.ts
3944Realms 768f38fc97 feat: 可使用的构建模板
修改了脚本,使其可以推给Maven仓库
2026-05-03 13:02:19 +08:00

28 lines
949 B
TypeScript

/**
* Splits `string` into an array of its words.
*
* @param {string | object} str - The string or object that is to be split into words.
* @param {RegExp | string} [pattern] - The pattern to match words.
* @returns {string[]} - Returns the words of `string`.
*
* @example
* const wordsArray1 = words('fred, barney, & pebbles');
* // => ['fred', 'barney', 'pebbles']
*
*/
declare function words(string?: string, pattern?: string | RegExp): string[];
/**
* Splits `string` into an array of its words.
*
* @param {string | object} str - The string or object that is to be split into words.
* @param {RegExp | string} [pattern] - The pattern to match words.
* @returns {string[]} - Returns the words of `string`.
*
* @example
* const wordsArray1 = words('fred, barney, & pebbles');
* // => ['fred', 'barney', 'pebbles']
*/
declare function words(string: string, index: string | number, guard: object): string[];
export { words };