interpolate-url
0.0.2 • Public • Published interpolate-url
Basic api to do url interpolation using colons as the delimiter.
var interpolateUrl = require('interpolate-url');
var url = interpolateUrl('http://google.com/user/:id', {id: 10});
var url = interpolateUrl('http://google.com/:type/:id', {type: 'car', id: 10});
Also allows partial interpolation:
var url = interpolateUrl('http://google.com/:type/:id', {id: 10});
Package Sidebar
Install
Weekly Downloads