geraintluff / uri-templates

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

fill does not work as documented #15

Open BadIdeaException opened 9 years ago

BadIdeaException commented 9 years ago

The following statement

new UriTemplate('/categories/{id}')
            .fill({ id: 1 });

produces "TypeError: '[object Object]' is not a function (evaluating 'valueFunction(varSpec.name)')", although from my understanding of the docs this is a correct invocation.

geraintluff commented 8 years ago

Yeah, that should work.

What version are you using?

BadIdeaException commented 8 years ago

Sorry, can't tell anymore...I came across this trying out different candidates for URI templating and ended up using a different one. I was using whatever was the current version when I posted this issue (August 13th).

geraintluff commented 8 years ago

Fair enough - worrying, though, as I can't reproduce this. Do you remember whether you fetched it with NPM/Bower/???

BadIdeaException commented 8 years ago

Bower. Weird that you can't reproduce it though. I'll see if I can find time to check it out again tomorrow.

geraintluff commented 8 years ago

It's possible I'm not publishing to Bower properly, so it might have an older version.

brettz9 commented 8 months ago

I know this is an ancient issue, but FWIW, with Bower deprecated, I think we might want to actually just remove Bower completely by now.