templayed

WebJar for templayed

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

templayed
Last Version

Last Version

0.2.3
Release Date

Release Date

Type

Type

jar
Description

Description

templayed
WebJar for templayed
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/heldr/node-templayed

Download templayed

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/templayed/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>templayed</artifactId>
    <version>0.2.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/templayed/
implementation 'org.webjars.npm:templayed:0.2.3'
// https://jarcasting.com/artifacts/org.webjars.npm/templayed/
implementation ("org.webjars.npm:templayed:0.2.3")
'org.webjars.npm:templayed:jar:0.2.3'
<dependency org="org.webjars.npm" name="templayed" rev="0.2.3">
  <artifact name="templayed" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='templayed', version='0.2.3')
)
libraryDependencies += "org.webjars.npm" % "templayed" % "0.2.3"
[org.webjars.npm/templayed "0.2.3"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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>";

CREDITS

Paul Engel and Helder Santana

Versions

Version
0.2.3