micromustache
Advanced tools
Comparing version 3.0.1 to 3.0.2
{ | ||
"name": "micromustache", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"homepage": "https://github.com/userpixel/micromustache", | ||
@@ -5,0 +5,0 @@ "description": "A faster and smaller subimplementation of the {{mustache}} template engine for JavaScript", |
{ | ||
"name": "micromustache", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "A faster and smaller subimplementation of the {{mustache}} template engine for JavaScript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -93,7 +93,28 @@ [![GitHub issues](https://img.shields.io/github/issues/userpixel/micromustache.svg?style=flat-square)](https://github.com/userpixel/micromustache/issues) | ||
```js | ||
var viewObject = require('.package.json'); //or load via ajax | ||
micromustache.render("micromustache is tested with mocha version {{devDependencies.mocha}}", viewObject); | ||
//output = "^2.5.3" | ||
var singer = { | ||
first: 'Michael', | ||
last: 'Jackson', | ||
children: [ | ||
{ | ||
first: 'Paris-Michael', | ||
middle: 'Katherine', | ||
}, | ||
{ | ||
first: 'Prince', | ||
middle: 'Michael', | ||
prefix: 'II' | ||
}, | ||
{ | ||
first: 'Michael', | ||
middle: 'Joseph', | ||
prefix: 'Jr.' | ||
} | ||
] | ||
} | ||
micromustache.render("{{first}} {{last}} had {{children.length}} children: {{children.0.first}}, {{children.1.first}} and {{children.2.first}}", singer); | ||
//output = "Michael Jackson had 3 children: Paris-Michael, Prince and Michael" | ||
``` | ||
As you can see micromustache doesn't have loops or any other fancy feature that MustacheJS offers. | ||
### Differences with MustacheJS render() method | ||
@@ -100,0 +121,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72116
194