uri-templates icon indicating copy to clipboard operation
uri-templates copied to clipboard

fill does not work as documented

Open BadIdeaException opened this issue 9 years ago • 6 comments

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.

BadIdeaException avatar Aug 13 '15 13:08 BadIdeaException

Yeah, that should work.

What version are you using?

geraintluff avatar Sep 30 '15 17:09 geraintluff

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).

BadIdeaException avatar Oct 02 '15 08:10 BadIdeaException

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

geraintluff avatar Oct 02 '15 18:10 geraintluff

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

BadIdeaException avatar Oct 02 '15 19:10 BadIdeaException

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

geraintluff avatar Oct 05 '15 10:10 geraintluff

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.

brettz9 avatar Jan 14 '24 21:01 brettz9