npm.io
0.1.2 • Published 7 years ago

escaping

Licence
MIT
Version
0.1.2
Deps
0
Size
12 kB
Vulns
0
Weekly
0

Escaping

NPM version Build Status Downloads License

Functions for escaping characters and removing escaping.

Russian readme

Install

npm install escaping

Usage

escape()
import { escape } from 'escaping';

let result = escape('1.2.3', '.', '\\'); // '1\\.2\\.3'
unescape()
import { unescape } from 'escaping';

let result = unescape('1\\.2\\.3', '.', '\\'); // '1.2.3'
split()
import { split } from 'escaping';

let result = split('1.2.3', '.', '\\'); // ['1', '2', '3']

Testing

To run tests, use:

npm test