build-uri-path
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

build-uri-path

Build Status npm version Coverage Status

This is the accompanying source code for the blog post Reduce, Reuse, React published for JavaScript January.

TL;DR

  • Reliably build a Uri path
  • Use as a Tagged Template Literal function

Install

$ npm i --save build-uri-path

Usage

import buildUriPath from 'build-uri-path';
 
const resource = 'topic';
const id = 'form/function';
 
const path = buildUriPath`/${resource}/${id}`;

In this example, path would equal "/topic/form%2Ffunction/"

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1
  • 0.3.0
    1
  • 0.2.0
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i build-uri-path

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • donavon