Cleanly split a string by retaining the delimiter.
npm install clean-splitCleanly split a string by retaining the delimiter.

``sh`
npm install clean-split
`js
const cleanSplit = require("clean-split");
cleanSplit("a-b-c", "-");
//=> ["a", "-", "b", "-", "c"]
cleanSplit("a-b-c", "-", { anchor: "before" });
//=> ["a-", "b-", "c"]
cleanSplit("a-b-c", "-", { anchor: "after" });
//=> ["a", "-b", "-c"]
`
#### string
Type: string
The string to split.
#### delimiter
Type: string or regexp
The delimiter to split the string by.
#### options
Type: object
##### anchor
Type: string (none, before, after, left or right)\none`
Default:
Anchor the delimiter to different sides of the split.