JSPM

template-url

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 42835
  • Score
    100M100P100Q138341F
  • License ISC

Super simple no fluff rest URL style formatting for node.

Package Exports

  • template-url

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (template-url) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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