split-string icon indicating copy to clipboard operation
split-string copied to clipboard

Split a string on a given character or characters, with support for escaping.

Results 8 split-string issues
Sort by recently updated
recently updated
newest added

After using `spilt` in my angular project, the corresponding lazy loaded module route cannot be accessed.The same problem with `union-values`

I want this: ```js split('lorem ipsum@dolor sit@amet', { separator: [' ', '@']}); // result: ['lorem', 'ipsum', 'dolor', 'sit', 'amet'] split('lorem ipsum@dolor sit@amet', { separator: state => [' ', '@'].includes(state.value()) });...

Using the `state` param within the `keep()` function has the incorrect `index` when encountering a quote. Looking at the code, `state.index = i`, but then later `i` is changed without...

It appears the logic for when to respect a quote vs an escaped quote does not consider if the preceding escape char is itself escaped. For example: ``` $ node...

I think it would be useful if `split-string` would, like `String.prototype.split`, support splitting using a RegExp as the separator. One example where this is useful is with multiple separators in...

request