@vparth/str-esc
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

str-esc

Utility to escape entities in string

Can also split/join strings with respect of escaping

Example

    // import {EscapeService} from 'str-esc';
    const {EscapeService} = require('str-esc');

    let svc = new EscapeService('%');
    svc.encode('100% Y-m-d', ['Y', 'm', 'd']); // '100%% %Y-%m-%d'

    svc = new EscapeService();
    svc.split(', ', 'a, b\\, c, d');    // ['a', 'b, c', 'd']
    svc.join(', ', ['a', 'b, c', 'd']); // 'a, b\\, c, d'

Readme

Keywords

none

Package Sidebar

Install

npm i @vparth/str-esc

Weekly Downloads

1

Version

1.0.7

License

MIT

Unpacked Size

6.71 kB

Total Files

11

Last publish

Collaborators

  • vparth