template-url

1.0.0 • Public • Published

template-url

Super simple no fluff rest URL style formatting for node.

Installation

> npm install template-url --save

Usage

var templateUrl = require('template-url');
 
var url = templateUrl('https://api.github.com/repos/:owner/:repo', { owner : 'saintedlama', repo: 'template-url' }); 
 
// Generates https://api.github.com/repos/saintedlama/template-url

Be aware that this module throws errors in case a part of the template URL cannot be resolved.

The End

This is a 27 lines module. Nothing more to say

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    46,705
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    46,705

Package Sidebar

Install

npm i template-url

Weekly Downloads

39,244

Version

1.0.0

License

ISC

Last publish

Collaborators

  • saintedlama