d at domenic.me (2014-12-19T22:53:16.732Z)
> 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:
>
> ```js
> 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" });
```
> 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>