node package manager
Stop wasting time. Easily manage code sharing in your team. Create a free org »

popsicle-constants

Popsicle Constants

NPM version NPM downloads Build status Test coverage

Replace constants in the request URL.

Installation

npm install popsicle-constants --save

Usage

var request = require('popsicle')
var constants = require('popsicle-constants')
 
request('http://example.com/{API_KEY}/users.json')
  .use(constants({
    API_KEY: 'abc'
  }))
  //=> { url: "http://example.com/abc/users.json" } 

License

MIT