Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

templayed

heldr67.9kMIT0.2.3

templayed.js (The fastest and smallest Mustache compliant Javascript templating library) for node.js

template, engine, mustache, mustache.js

readme

node-templayed

A simple port of templayed.js for node.js

The fastest and smallest Mustache compliant Javascript templating library See more

Getting Started

Install it just running npm install templayed into your project.

HOW TO USE

var templayed = require('templayed');

var tpl  = "<ul>{{#names}}<li>{{../fullName}}</li>{{/names}}</ul>",
    data = {
        names: [{firstName: "Paul", lastName: "Engel"}, {firstName: "Chunk", lastName: "Norris"}],
        fullName: function() {
            return this.lastName + ", " + this.firstName;
        }
    };

var html = templayed(tpl)(data);

console.log( html ); //=> "<ul><li>Engel, Paul</li><li>Norris, Chunk</li></ul>";

JS PERF BENCHMARK

JS PERF

CREDITS

Paul Engel and Helder Santana