JSPM

encode-path-to-uri

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q22859F
  • License ISC

An NPM package to encode local paths to a URI path

Package Exports

  • encode-path-to-uri

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (encode-path-to-uri) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

A simple NPM to convert local file locations into URI acceptable strings.

How to install

npm install --save encode-path-to-uri

Example on usage

const encodePathToUri = require('encode-path-to-uri');

const encodedPath = encodePathToUri('/home/user/caffiend/How to brew coffee.pdf');
console.log(encodedpath); // /home/user/caffiend/How%20to%20brew%20coffee.pdf