New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

interpolate-url

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

interpolate-url

Interpolate urls containing /:colon variables

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

interpolate-url

Build Status

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});

// url => http://google.com/user/10

var url = interpolateUrl('http://google.com/:type/:id', {type: 'car', id: 10});

// url => http://google.com/car/id

Also allows partial interpolation:

var url = interpolateUrl('http://google.com/:type/:id', {id: 10});

// url => http://google.com/:type/id

Keywords

interpolate

FAQs

Package last updated on 26 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts