jengine-template
powerful javascript template engine
Last updated 12 years ago by jgermade .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install jengine-template 
SYNC missed versions from official npm registry.

jEngine: $template wercker status

Bower version npm version Build Status Installation

npm install jengine-template --save

or

bower install jengine-template --save

Usage

var data = {
  foo: 'bar',
  crash: {
    test: 'dummy'
  },
  list: ['foo', 'bar', 'foobar'],
  map: {
    hi: 'all',
    bye: 'nobody'
  },
  template: 'sample',
  label: {
    cancel: 'cancel'
  }
};

$template.compile('$if{ foo === "bar" }gogogo{:}whoops{/}')(data)
// returns 'gogogo'

$template.compile('$each{ item, key in map }[${foo}:${key}:${item}]{/}')(data);
// returns '[bar:hi:all][bar:bye:nobody]'

Current Tags

  • 0.1.2                                ...           latest (12 years ago)

1 Versions

  • 0.1.2                                ...           12 years ago
Maintainers (1)
Downloads
Total 2
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 0
Dependencies (0)
None
Dev Dependencies (14)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE