Parse and expand URI templates as defined by http://tools.ietf.org/html/draft-gregorio-uritemplate-08, with the additional, non-RFC {%unescaped} expression
npm install uri-template-w-unescaped
This is a node.js implementation of the URI template draft standard
defined at http://tools.ietf.org/html/rfc6570
``javascript
parser = require('uri-template')
tpl = parser.parse('/{year}/{month}/{day}{?orderBy,direction}')
tpl.expand({ year: 2006, month: 6, day: 6 }) # /2006/6/6
tpl.expand({ year: 2006, month: 6, day: 6, orderBy: 'size' })
tpl = parser.parse('/search{?q,*otherParams}')
tpl.expand({ q: 'Bigger office', otherParams: { prefer: "Sterling's office", accept: "Crane's office" }})
For more thorough coverage of the syntax, see
test.js` or the RFC.