Skip to content

Function: words() ​

ts
function words(value): string[];

Splits a string into normalized words. 将字符串拆分为标准化单词数组。

Parameters ​

ParameterTypeDescription
valuestringThe source string / 源字符串

Returns ​

string[]

The split words / 拆分后的单词数组

Example ​

ts
words('fooBar baz')
// => ['foo', 'Bar', 'baz']

Since ​

1.2.0

Released under the MIT License.