Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saintedlama/template-url
Super simple no fluff rest URL style formatting for node.
https://github.com/saintedlama/template-url
Last synced: 2 months ago
JSON representation
Super simple no fluff rest URL style formatting for node.
- Host: GitHub
- URL: https://github.com/saintedlama/template-url
- Owner: saintedlama
- Created: 2015-07-25T10:09:35.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-31T21:39:42.000Z (over 7 years ago)
- Last Synced: 2024-04-25T17:41:46.571Z (8 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# template-url
Super simple no fluff rest URL style formatting for node.## Installation
> npm install template-url --save
## Usage
```javascript
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