Functions for escaping characters and removing escaping.
npm install escaping
import { escape } from 'escaping';
let result = escape('1.2.3', '.', '\\'); // '1\\.2\\.3'
import { unescape } from 'escaping';
let result = unescape('1\\.2\\.3', '.', '\\'); // '1.2.3'
import { split } from 'escaping';
let result = split('1.2.3', '.', '\\'); // ['1', '2', '3']
To run tests, use:
npm test