Split a string on the first occurrence of a given separator

npm-package split string string-manipulation string-split
1 Open Issue Need Help Last updated: Aug 24, 2025

Open Issues Need Help

View All on GitHub
Regex support 2 months ago

AI Summary: This GitHub issue proposes adding regular expression support to the `split-on-first` library. The current implementation likely uses `indexOf` for splitting, and the suggestion is to replace it with `search` (or `match`) to enable splitting on regex patterns, as demonstrated by the example `splitOnFirst('a,b,c', /[.,]/)`.

Complexity: 2/5
enhancement help wanted

Split a string on the first occurrence of a given separator

JavaScript
#npm-package#split#string#string-manipulation#string-split