@luxuryescapes/lib-uri-templates
v3.0.6
Published
All our routes in a repo for profit
Downloads
13,201
Maintainers
Keywords
Readme
LE URI Templates Library
Published templates:
const uri = require('lib-uri-templates');
const template = uri.templates.reservation.properties;
// Or legacy API:
// const template = uri.get('properties');
template.rfc6570 // '/api/properties{?id_salesforce_external,limit,page}'
template.expand({id_salesforce_external: 1}) // '/api/properties?id_salesforce_external=1
Development templates:
const uri = require('lib-uri-templates');
const template = uri.mock('/api/properties{?id_salesforce_external,limit,page}')
template.rfc6570 // '/api/properties{?id_salesforce_external,limit,page}'
template.expand({id_salesforce_external: 1}) // '/api/properties?id_salesforce_external=1
publish
- Merge your branch
- Checkout master
- Run
yarn publish