geraintluff / uri-templates

JavaScript utility for RFC 6570: URI Templates
138 stars 21 forks source link

Template should be avaliable property in instance of UriTemplate #7

Closed awwright closed 10 years ago

awwright commented 10 years ago

When examining an instance of UriTemplate, there's only three properties: fill, fromUri, and varNames.

The first two of these should probably be in the instance's prototype.

Like varNames, UriTemplate should expose the URI template string used to construct it, for informative purposes, so I can do e.g.:

console.log( templates.map(function(v){ return v.template; }) );

Where templates is an Array.

geraintluff commented 10 years ago

OK, so you'd like the original template string available as a property? Seems reasonable enough. :)

geraintluff commented 10 years ago

Released as v0.1.5.