0.2.0 • Published 9 years ago

properjs-template v0.2.0

Weekly downloads
3
License
-
Repository
github
Last release
9 years ago

template

The worlds smallest template rendering engine. No logic, non-iterable. Done.

Installation

npm install properjs-template --save-dev

Usage

var template = require( "properjs-template" );

var data = {
    foo: "Bar"
};
var html = "<h1>{foo}</h1>";

// You can also use double brackets, your choice
// var html = "<h1>{{foo}}</h1>";

// Render some stuff
var rendered = template( html, data );

// Output:
// <h1>Bar</h1>