Split on last
Like split-on-first but splits on the last occurence.
Install
npm install split-on-last
Usage
const splitOnlast = ; ;//=> ['a-b', 'c'] ;//=> ['key:value', 'value2'] ;//=> ['a---b', 'c'] ;//=> [] ;//=> []
API
splitOnLast(string, seperator)
string
Type: string
The string to split.
seperator
Type: string
The separator to split on.