jstools-compile

0.1.11 • Public • Published

jEngine: $compile wercker status

Bower version npm version Build Status Installation

npm install jstools-compile --save

or

bower install jstools-compile --save

Usage

var data = {
  foo: 'bar',
  crash: {
    test: 'dummy'
  },
  list: ['foo', 'bar', 'foobar'],
  map: {
    hi: 'all',
    bye: 'nobody'
  },
  template: 'sample',
  label: {
    cancel: 'cancel'
  }
};
 
$compile('$if{ foo === "bar" }gogogo{:}whoops{/}')(data)
// returns 'gogogo'
 
compile('$each{ item, key in map }[${foo}:${key}:${item}]{/}')(data);
// returns '[bar:hi:all][bar:bye:nobody]'

Readme

Keywords

Package Sidebar

Install

npm i jstools-compile

Weekly Downloads

1

Version

0.1.11

License

MIT

Last publish

Collaborators

  • gsusgz