Create a URL/path in a simple human readable way.
Install the npm package and use browserify or a simular tool to compile.
npm install https://github.com/orangemug/create-url.git
Any object keys not in the template URL will get added as params.
var createURL = require("create-url");
createURL("/path/{id}?index=3#section-{sectionNum}", {
id: "badger",
ref: "mushroom",
sectionNum: 1
}); // => "/path/badger?index=3&ref=mushroom#section-1"
See tests for more examples.
MIT