Skip to content

replace path string to valid path, escaping all spacial characters and spaces to underscore(`_`), which will be useful generating simple urls.

License

Notifications You must be signed in to change notification settings

chilijung/path-replace

Repository files navigation

path-replace NPM version Dependency Status

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

About

replace path string to valid path, escaping all spacial characters and spaces to underscore(`_`), which will be useful generating simple urls.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published