0.0.2 • Published 9 years ago

hairlip v0.0.2

Weekly downloads
1
License
BSD-2-Clause
Repository
github
Last release
9 years ago

hairlip

a very tiny version of mustache

Usage

Just pass in a data object whose direct properties will be used to substitute for tokens with matchign names in the template text.

eg.

var hairlip = require("hairlip"),
    template = "Hi {{name}}, it is currently {{dts}}";
    data = { name: "baldrick", dts: function() { return new Date().toString()} };
console.log(hairlip(data, template));

Note: nested properties are not supported.

License

BSD