Skip to content

lux-group/lib-uri-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI

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

  1. Merge your branch
  2. Checkout master
  3. Run yarn publish