1. templayed
templayed.js (The fastest and smallest Mustache compliant Javascript templating library) for node.js
templayed
Package: templayed
Created by: heldr
Last modified: Mon, 27 Jun 2022 04:42:29 GMT
Version: 0.2.3
License: MIT
Downloads: 90,263
Repository: https://github.com/heldr/node-templayed

Install

npm install templayed
yarn add templayed

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

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code