uri-templates
uri-templates copied to clipboard
fill does not work as documented
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.
Yeah, that should work.
What version are you using?
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).
Fair enough - worrying, though, as I can't reproduce this. Do you remember whether you fetched it with NPM/Bower/???
Bower. Weird that you can't reproduce it though. I'll see if I can find time to check it out again tomorrow.
It's possible I'm not publishing to Bower properly, so it might have an older version.
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.