0.1.3 • Published 7 years ago

uri-params v0.1.3

Weekly downloads
1,518
License
MIT
Repository
github
Last release
7 years ago

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.