3 ms·
looking at the todo example, i was perplexed by the way templates are inlined through comments: https://github.com/foam-framework/foam/blob/master/apps/todo/To
by exit 11y ago
looking at the todo example, i was perplexed by the way templates are inlined through comments:
https://github.com/foam-framework/foam/blob/master/apps/todo/Todo.js https://github.com/foam-framework/foam/blob/master/apps/todo...
it led me to discover that the full text of a function can be reflected through .toString() ...
i'm not sure i'd be happy to see this approach widely adopted though. it feels like a language hack, like maybe js needs a multiline literal string..
- MrBuddyCasino 11y agoIn case this is not already widely known, ES6 has that: var multiline = `line 1 line 2 line 3`;
- realityking 11y agoEcmaScript 6 has got us covered: https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/template_strings https://developer.mozilla.org/de/docs/Web/JavaScript/Referen...