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/"

Readme

Keywords

Package Sidebar

Install

npm i build-uri-path

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • donavon