{"_id":"minstache","_rev":"137289","name":"minstache","description":"Mini mustache template engine","dist-tags":{"latest":"1.2.0"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"time":{"modified":"2021-06-03T11:22:26.000Z","created":"2012-09-05T02:05:02.703Z","1.2.0":"2014-06-18T04:38:48.323Z","1.1.0":"2013-07-04T19:15:52.043Z","1.0.0":"2012-11-07T00:29:15.147Z","0.0.1":"2012-09-05T02:05:02.703Z"},"users":{"quocnguyen":true,"tomjamescn":true},"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"versions":{"1.2.0":{"name":"minstache","version":"1.2.0","description":"Mini mustache template engine","keywords":["mustache","template","engine"],"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"dependencies":{"commander":"1.0.4"},"devDependencies":{"mocha":"*","should":"*"},"bin":{"minstache":"bin/minstache"},"main":"index","_id":"minstache@1.2.0","dist":{"shasum":"ff1cc403ac2844f68dbf18c662129be7eb0efc41","size":2500,"noattachment":false,"key":"/minstache/-/minstache-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/minstache/download/minstache-1.2.0.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"publish_time":1403066328323,"_cnpm_publish_time":1403066328323,"_hasShrinkwrap":false},"1.1.0":{"name":"minstache","version":"1.1.0","description":"Mini mustache template engine","keywords":["mustache","template","engine"],"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"dependencies":{"commander":"1.0.4"},"devDependencies":{"mocha":"*","should":"*"},"bin":{"minstache":"bin/minstache"},"main":"index","readmeFilename":"Readme.md","_id":"minstache@1.1.0","dist":{"shasum":"5c2e11f4214ea670211a7d6ca3a273ac9bc43730","size":2424,"noattachment":false,"key":"/minstache/-/minstache-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/minstache/download/minstache-1.1.0.tgz"},"_from":".","_npmVersion":"1.2.25","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"publish_time":1372965352043,"_cnpm_publish_time":1372965352043,"_hasShrinkwrap":false},"1.0.0":{"name":"minstache","version":"1.0.0","description":"Mini mustache template engine","keywords":["mustache","template","engine"],"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"dependencies":{"commander":"1.0.4"},"devDependencies":{"mocha":"*","should":"*"},"bin":{"minstache":"bin/minstache"},"main":"index","readmeFilename":"Readme.md","_id":"minstache@1.0.0","dist":{"shasum":"8f57273776872bab865942b71935b03d0891f9bc","size":2366,"noattachment":false,"key":"/minstache/-/minstache-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/minstache/download/minstache-1.0.0.tgz"},"_npmVersion":"1.1.65","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"publish_time":1352248155147,"_cnpm_publish_time":1352248155147,"_hasShrinkwrap":false},"0.0.1":{"name":"minstache","version":"0.0.1","description":"Mini mustache template engine","keywords":["mustache","template","engine"],"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"dependencies":{"commander":"1.0.4"},"devDependencies":{"mocha":"*","should":"*"},"bin":{"minstache":"bin/minstache"},"main":"index","_id":"minstache@0.0.1","dist":{"shasum":"8b53bfc7852f774c003f06f2a998084d90d8c2a7","size":3085,"noattachment":false,"key":"/minstache/-/minstache-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/minstache/download/minstache-0.0.1.tgz"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"publish_time":1346810702703,"_cnpm_publish_time":1346810702703,"_hasShrinkwrap":false}},"readme":"\n# minstache\n\n  Mini mustache template engine.\n\n## Installation\n\n    $ npm install minstache\n    $ component install visionmedia/minstache\n\n## minstache(1)\n\n  The `minstache(1)` executable can compile a file to a valid\n  stand-alone commonjs module for you, there's no need to have minstache\n  as a dependency:\n\n  hello.mustache:\n\n```\nHello {{name}}! {{^authenticated}}<a href=\"/login\">login</a>{{/authenticated}}\n```\n\n  convert it:\n\n```\n$ minstache < hello.mustache > hello.js\n```\n\n  hello.js:\n\n```js\nmodule.exports = function anonymous(obj) {\n\n  function escape(html) {\n    return String(html)\n      .replace(/&/g, '&amp;')\n      .replace(/\"/g, '&quot;')\n      .replace(/</g, '&lt;')\n      .replace(/>/g, '&gt;');\n  };\n\n  function section(obj, prop, negate, str) {\n    var val = obj[prop];\n    if ('function' == typeof val) return val.call(obj, str);\n    if (negate) val = !val;\n    if (val) return str;\n    return '';\n  };\n\n  return \"Hello \" + escape(obj.name) + \"! \" + section(obj, \"authenticated\", true, \"<a href=\\\"/login\\\">login</a>\") + \"\\n\"\n}\n```\n\n## API\n\n### minstache(string, [obj])\n\n  Compile and render the given mustache `string` with optional context `obj`.\n\n### minstache.compile(string)\n\n  Compile the mustache `string` to a stand-alone `Function` accepting a context `obj`.\n\n## Divergence\n\n  Partials are not supported, this lib is meant to be a small template engine solution for stand-alone [component](http://github.com/component) templates. If your template takes \"partials\" then pass other rendered strings to it. If you need a full-blown mustache solution Hogan.js is still great.\n\n  Minstache uses `{{!name}}` for unescaped properties.\n\n## License\n\n  MIT\n","_attachments":{}}