README
Mr. Jt 🎩
Meet beardless customizable template engine, Mr. Jt for Node.js and Web browsers.
jt.use('', ' $Hello %p% {{world}} ')
.as({ p: 'amazing'})
.reset().as({ p: 'crazy'})
// ... +$Hello, +{{world}}
jt.use('s1', 'Today is a {( a < b )} good {/} bad {;} day!')
.sa(jtif, { a: 5, b: 7})
.value()
Why Jt ?
Extremely small, fast, and damn customizable. Okay, Let's see what's going on:
Speed 🚀
Only native lower-level implementation. Even for conditional statements, like:
{( d > 5 )} yes {/} no {;}
Which do not uses regex, or eval(), or new Function(), ... Feel the speed.
Size 📦
Extra small size. Just about o-n-e kilobyte of fully workable core engine:
- ~ 1.02 KB for Core of ES6 gzipped;
- ~ 1.09 KB for Core of ES3 gzipped;
Same things for custom handlers.
Configurable 🔧
You can configure, add, or change anything!
Jt was designed to be loyal to your preferences on the fly. Maybe for this:
jt.use('s1', 'Good {{p}}, $p -p- !')
.as({ p: 'Jt' })
.as({ p: 'Mr.' }, {op: '