Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

path-to-template

0.0.3 • Public • Published

path-to-template

Installation

$ npm install --save path-to-template

Example

var pathT = require('path-to-template');
var tpl = pathT('/:a+/:b+');
var params = tpl.parse('/hello/world');
console.log(params);
var path = tpl.expand(params);
console.log(path);
 
// Output:
// { a: 'hello', b: 'world' }
// /hello/world

Install

npm i path-to-template

DownloadsWeekly Downloads

1

Version

0.0.3

License

ISC

Last publish

Collaborators

  • avatar