3 ms·
That looks pretty cool, but I have to ask... you're using with? Really?
by MatthewPhillips 15y ago
That looks pretty cool, but I have to ask... you're using with? Really?
- insin 15y agoYes, it's perfect for building templates in code based on an object defining your templating API - code which is run once at startup with little or no assignment and no ambiguity between the contents of the context object and anything else, e.g.: https://github.com/insin/sacrum/blob/master/fragile/lib/fragile.js#L450-482 https://github.com/insin/sacrum/blob/master/fragile/lib/frag... You could easily go back and plug in use of a single-letter variable instead of the implicit context object after the fact, but it's nicer to work with while you're building stuff up.