backoffice/node_modules/uri-path
root ab9f8bb658 first commit 2020-02-06 10:09:39 +00:00
..
test first commit 2020-02-06 10:09:39 +00:00
.npmignore first commit 2020-02-06 10:09:39 +00:00
.travis.yml first commit 2020-02-06 10:09:39 +00:00
CONTRIBUTING.md first commit 2020-02-06 10:09:39 +00:00
LICENSE first commit 2020-02-06 10:09:39 +00:00
README.md first commit 2020-02-06 10:09:39 +00:00
index.js first commit 2020-02-06 10:09:39 +00:00
package.json first commit 2020-02-06 10:09:39 +00:00

README.md

uri-path

NPM version Build Status devDependency Status

Convert relative file system paths into safe URI paths

Install

npm install --save uri-path

Usage

var URIpath = require('uri-path');

// Properly encode URI path segments
URIpath('../abc/@#$%¨&()[]{}-_=+ß/môòñ 月 قمر');
// -> '../abc/%40%23%24%25%C2%A8%26()%5B%5D%7B%7D-_%3D%2B%C3%9F/m%C3%B4%C3%B2%C3%B1%20%E6%9C%88%20%D9%82%D9%85%D8%B1'

// Also supports Windows backslash paths
URIpath('a\\b\\c');
// -> 'a/b/c'