Hacker News new | ask | show | jobs
by exit 4078 days 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...

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..

2 comments

In case this is not already widely known, ES6 has that:

    var multiline = `line 1
    line 2
    line 3`;