UNPKG

@adaptabletools/adaptable-cjs

Version:

Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

14 lines (13 loc) 472 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = words; /** * Split a string into words: handles camelCase, PascalCase, UPPER_CASE, * UPPER_SNAKE_CASE, snake_case, kebab-case, spaces, and dot.notation. * * Shared helper used by kebabCase, startCase, and sentenceCase. */ function words(str) { const matches = str.match(/[A-Z]?[a-z]+|[A-Z]+(?=[A-Z][a-z]|\d|$|[^a-zA-Z0-9])|[A-Z]|[0-9]+/g); return matches || []; }