Skip to content

donavon/build-uri-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Reliably build a Uri path

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published