path-replace
v0.1.0
Published
replace path string to valid path, escaping all spacial characters and spaces to underscore(`_`), which will be useful generating urls.
Downloads
5
Readme
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