Socket
Socket
Sign inDemoInstall

uri-path

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uri-path

Convert relative file system paths into safe URI paths


Version published
Weekly downloads
312K
decreased by-5.03%
Maintainers
1
Weekly downloads
 
Created
Source

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 paths with Windows directory separators
URIpath('a\\b\\c');
// -> 'a/b/c'

Keywords

FAQs

Package last updated on 24 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc