how to delay interpolation of template strings?

Claude Pache claude.pache at gmail.com
Tue Dec 16 09:03:32 PST 2014


> Le 16 déc. 2014 à 16:42, Matthew Robb <matthewwrobb at gmail.com> a écrit :
> 
> Actually, it would be cool if some sugar could be done for the example I just did:
> 
> var template = compile`
> Hello ${{first_name}}
> `;
> 
> template({ first_name: "John" });
> 

I guess you want sugar for the following valid ES6 code?


```javascript

var template = _ => `
Hello ${_.first_name}
`;

template({ first_name: "John" });

```

—Claude


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141216/5d54f288/attachment.html>


More information about the es-discuss mailing list