source: node_modules/es-toolkit/dist/string/words.mjs

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 251 bytes
Line 
1const CASE_SPLIT_PATTERN = /\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;
2function words(str) {
3 return Array.from(str.match(CASE_SPLIT_PATTERN) ?? []);
4}
5
6export { CASE_SPLIT_PATTERN, words };
Note: See TracBrowser for help on using the repository browser.