separator-escape

0.0.1 • Public • Published

separator-escape

split a string by a separator, with an escape.

you can choose both the separate and escape.

example

//separate by , and escape by !
var sep = require('separator-escape')(',','!')
sep.stringify(['a','b','c'])
// => "a,b,c"
// escape separator
sep.stringify(['a','x,y','c'])
// => a,x!,y,b
 
//escape escape
sep.stringify(['a','x!y','c'])
// => a,x!!y,b
 
//escape escape escape separator
sep.stringify(['a','x!,y','c'])
// => a,x!!!,y,b
 

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i separator-escape

Weekly Downloads

98

Version

0.0.1

License

MIT

Unpacked Size

3.88 kB

Total Files

6

Last publish

Collaborators

  • dominictarr