3 ms·
TIL https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Tagged_templates https://developer.mozilla.org/en-US/docs/Web/JavaScript
by dixie_land 8y ago
TIL https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Tagged_templates https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
I'm not a JavaScript developer so this is news to me, very neat feature!
- simlevesque 8y agoHere's a list of tagged template literals: https://github.com/declandewet/common-tags https://github.com/declandewet/common-tags
- reificator 8y agoWhich brings up a question: Is it possible to have multiple tags on a given string? Composing smaller helpers would be nice, but I don't see how the syntax would work.
- simlevesque 8y agoYou'd just need to create a meta tagged litteral function. tagged litteral can accept parameters.