Separate a string at the specified indicies
$ npm install --save separate
var separate = require('separate')
separate('000551234', '-', [3, 5])
//=> 000-55-1234
Required
Type: string
A string to separate.
Required
Type: string
The string to use as a separator.
Required
Type: array[number]
The numeric indicies at which separators should be inserted in the original string.
MIT © Ben Drucker