tjs

Frontend to JavaScript Templating

npm install tjs
20 downloads in the last week
80 downloads in the last month

T.js

A frontend to javascript templating engines

Quick-start


application = new T('views/application.ejs'); //Loads views/application.ejs as an EJS template

application.update({username: 'admin'}); //Registers variable 'username' in this template
application.bind('body'); //Binds the template to the <body> element

application.update({username: 'guest'}); //Updates 'username' variable and pushes changes to the DOM

Note: Everything is chainable, so you can also do this:

new T('view/application.ejs')
   .update({username: 'admin'})
   .bind('body')
   .update({username: 'guest'});
npm loves you