Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

uri-params

yedaodao175MIT0.1.3

Format uri with variables. It can run both in Node.js runtime and browsers.

uri-params, url-params, browser, uri, params, variables, url

readme

uri-params

Build Status Coverage Status

Format uri with variables. It can run both in Node.js runtime and browsers.

Get Started

Use npm to install:

npm install --save uri-params

Use Commonjs/CMD

import uriParams from 'uri-params';

let url = 'http://example.com/:id';
// http://example.com/1
console.log(uriParams(url, {id:1}));

Use in browsers

<script src="http://example.com/public/node_modules/uri-params/dist/uri-params.js"></script>
<script>window.uriParams('http://example.com/:id', {id:1});
</script>

Feedback



If you have any questions or requirements, use Issues.