0.1.0 • Published 7 years ago
path-replace v0.1.0
path-replace
replace path string to valid path, escaping all spacial characters and spaces to underscore(
_
), which will be useful generating urls.
Installation
$ npm install --save path-replace
Usage
const str = `test~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\ \\/test2`;
assert.equal(pathReplace(str), 'test_test2');
License
Apache-2.0 © chilijung
0.1.0
7 years ago