source:
node_modules/es-toolkit/dist/string/words.mjs
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 251 bytes | |
| Line | |
|---|---|
| 1 | const CASE_SPLIT_PATTERN = /\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu; |
| 2 | function words(str) { |
| 3 | return Array.from(str.match(CASE_SPLIT_PATTERN) ?? []); |
| 4 | } |
| 5 | |
| 6 | export { CASE_SPLIT_PATTERN, words }; |
Note:
See TracBrowser
for help on using the repository browser.
