{"_id":"kiwi","_rev":"31-004fe7a2233d6163d0577444e7e4f53a","name":"kiwi","description":"Simple, modular, fast and lightweight template engine, based on jQuery templates syntax.","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"kiwi","description":"Simple, modular, fast and lightweight template engine, based on jQuery templates syntax.","version":"0.1.0","author":{"name":"Pierre Matri","email":"pierre.matri@coolony.com"},"contributors":[{"name":"Pierre Matri","email":"pierre.matri@coolony.com"}],"dependencies":{"frame":"*","underscore":"*","moment":"*"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["kiwi","asynchronous","template","web","express","engine","html"],"repository":{"type":"git","url":"git://github.com/coolony/kiwi.git"},"main":"index","scripts":{"test":"make test"},"engines":{"node":">= 0.5.0 < 0.7.0"},"_npmUser":{"name":"coolony","email":"pierre.matri@coolony.com"},"_id":"kiwi@0.1.0","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.18","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"e86c1172048f18bee61b08f8552ef51fcaed5646","tarball":"https://registry.npmjs.org/kiwi/-/kiwi-0.1.0.tgz","integrity":"sha512-tGn1jXvM4jO6i1dx+dRPbIHLUdXAU3hXQHmoz7tVZycgguz0XfhSg5jvJ1jtiJ5EmvICmjw73eYMEF1QebUUwA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQLQWECdZOXVbNCrsOcsZiDDngYhdAYGZ2Kw9c/bH1jgIhAKgKebz7P8o1DNt7Kz8OS2e0VF5mscrgDfQTrkclDiBZ"}]},"maintainers":[{"name":"coolony","email":"pierre.matri@coolony.com"}],"directories":{}},"0.1.2":{"name":"kiwi","description":"Simple, modular, fast and lightweight template engine, based on jQuery templates syntax.","version":"0.1.2","author":{"name":"Pierre Matri","email":"pierre.matri@coolony.com"},"contributors":[{"name":"Pierre Matri","email":"pierre.matri@coolony.com"}],"dependencies":{"frame":"*","underscore":"*","moment":"*"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["kiwi","asynchronous","template","web","express","engine","html"],"repository":{"type":"git","url":"git://github.com/coolony/kiwi.git"},"main":"index","scripts":{"test":"make test"},"engines":{"node":">= 0.4.0 < 0.7.0"},"_npmUser":{"name":"coolony","email":"pierre.matri@coolony.com"},"_id":"kiwi@0.1.2","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.18","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"6339531c13d16da09dacf2b89ea0d296b0357b55","tarball":"https://registry.npmjs.org/kiwi/-/kiwi-0.1.2.tgz","integrity":"sha512-XFoPYmoIo44RXCfTqaa9W8RqgXvP82ZGWKGApXbO29vfIOXd3JSl/AZrBrr1uOGcvaTCSqlz3U1VM8dgvvF6tA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmipb0NtD8gkt5XNGGepaKwTQkxdDScLXawXK03LlyQwIgDVCsfdAdzzc7coNgLv+k3vLxzSLkbvgnM3x9eeRXnXU="}]},"maintainers":[{"name":"coolony","email":"pierre.matri@coolony.com"}],"directories":{}},"0.1.3":{"name":"kiwi","description":"Simple, modular, fast and lightweight template engine, based on jQuery templates syntax.","version":"0.1.3","author":{"name":"Pierre Matri","email":"pierre.matri@coolony.com"},"contributors":[{"name":"Pierre Matri","email":"pierre.matri@coolony.com"}],"dependencies":{"frame":"*","underscore":"*","moment":"*"},"devDependencies":{"mocha":"*","should":"*","uglify-js":"*"},"keywords":["kiwi","asynchronous","template","web","express","engine","html"],"repository":{"type":"git","url":"git://github.com/coolony/kiwi.git"},"main":"index","scripts":{"test":"make test"},"engines":{"node":">= 0.6.0"},"_npmUser":{"name":"coolony","email":"pierre.matri@coolony.com"},"_id":"kiwi@0.1.3","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.18","_nodeVersion":"v0.8.1","_defaultsLoaded":true,"dist":{"shasum":"fd29752670821e08452513866f9294bdda720cb0","tarball":"https://registry.npmjs.org/kiwi/-/kiwi-0.1.3.tgz","integrity":"sha512-8lgr/vVqxWDceAd5PPPJTL42/5eEf5PgzhZ5g1N3nMAIOFYnhLkn+XR+s7Wlk8TwEHe+d4tMwh+SkqmDOqrDjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAkil6uixo2krZYIIMKQCpLo6J2VwTEn66Dc37Tx1p1aAiEApC7VmBt5dyc8pdqT8L9TYXXawiXJ0ToIVkijP7AthIc="}]},"maintainers":[{"name":"coolony","email":"pierre.matri@coolony.com"}],"directories":{}},"0.2.0":{"name":"kiwi","description":"Simple, modular, fast and lightweight template engine, based on jQuery templates syntax.","version":"0.2.0","author":{"name":"Pierre Matri","email":"pierre.matri@coolony.com"},"contributors":[{"name":"Pierre Matri","email":"pierre.matri@coolony.com"}],"dependencies":{"frame":"*","underscore":"*","moment":"*"},"devDependencies":{"mocha":"*","should":"*","uglify-js":"*","jshint":"*"},"keywords":["kiwi","asynchronous","template","web","express","engine","html"],"repository":{"type":"git","url":"git://github.com/coolony/kiwi"},"main":"index","scripts":{"test":"make test"},"engines":{"node":">= 0.6.0"},"readme":"[![Build Status](https://secure.travis-ci.org/coolony/kiwi.png?branch=master)](http://travis-ci.org/coolony/kiwi)\n\n# Kiwi\n\n\n## What is this?\n\nKiwi is a cool JavaScript template engine lovingly built from the ground up for Node.js with performance, extensibility, modularity and security in mind. It is compatible with most of [jQuery Template](http://api.jquery.com/category/plugins/templates/) syntax, and adds lots of features to it. This means Kiwi is:\n\n* **Fast**. Insanely fast.\n* **Completely asynchronous**. You have the absolute guarantee that not a single blocking call will be done after Kiwi has been initialized.\n* **Easily extensible**. Three short lines of code are enough to create a new tag.\n* **Incredibly powerful**, even for advanced features. Want dynamic template inheritance? Access individual block contents? Done!\n* **Easy to set up**. One line of code and you can get started on [Express](http://expressjs.com) 3.x. In most cases, you can even use your existing jQuery or [jqTpl](https://github.com/kof/node-jqtpl) templates without modification.\n* **Robust**. Kiwi is carefully tested before any change is pushed to the repository.\n* **Full-featured**. Lots of filters are available, and it can't be easier to add your own if you want.\n* **Secure**. All output is escaped by default.\n* **Clean**. Kiwi won't mess with your prototypes, and won't extend any of the built-in JavaScript objects.\n* **Good looking**. Kiwi is tested with [JSHint](https://github.com/jshint/node-jshint/) to ensure code quality.\n\n\nAs an additional feature, you can use Kiwi in client mode, with – almost – all features available, except for the few involving the file system.\n\n\n## Syntax example\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <title>${title}</title>\n  </head>\n  <body>\n    <p>\n      {{if name}}\n        Hello, ${name|capitalize}!\n      {{else}}\n        Hello, dear unknown!\n      {{/if}}\n    </p>\n  </body>\n</html>\n```\n\nPlease note this example template expects `name` and `title` variables to always be defined.\n\n\n## Server-side installation\n\n### Latest release\n\n```bash\nnpm install kiwi\n```\n\n### Development version (may not be suited for production [yet])\n\n```bash\nnpm install https://github.com/coolony/kiwi/tarball/master\n```\n\n## Usage\n\n### Loading a template from string\n\n```javascript\nvar kiwi = require('kiwi');\n\nvar template = '<p>Hello, ${name}!</p>';\nnew kiwi.Template(template).render({ name: \"Kiwi\" }, function onRendered(err, rendered) {\n  console.log('Rendered template is: ' + rendered);\n});\n```\n\n### Loading a template from disk\n\n```javascript\nvar kiwi = require('kiwi');\n\nvar template = new kiwi.Template().loadFile('template.kiwi', function onLoaded(err) {\n  template.render({ name: \"Kiwi\" }, function onRendered(err, rendered) {\n    console.log('Rendered template is: ' + rendered);\n  });\n});\n```\n\nIn order to make the process of loading and rendering a template easier, Kiwi does expose a handy `loadAndRender`shortcut:\n\n```javascript\nvar kiwi = require('kiwi');\n\nvar template = new kiwi.Template().loadAndRender('template.kiwi', { name: \"Kiwi\" }, function onRendered(err, rendered) {\n  console.log('Rendered template is: ' + rendered);\n});\n```\n\n### Client-side dependencies\n\nPlease note that client-side usage requires [Underscore.js](http://underscorejs.org/) to be included in the page. This requirement will be removed in a future release.\n\n\n## Accessing variables\n\nEvery key of the optional object passed as argument to the `Template#render` method will be made available for use in your template. You can also access your object with `$data`.\n\nFor example, when passing `{ name: 'Kiwi'}`, you will be able to use the `name` variable in your template, or `$data.name`.\n\n\n## Available tags\n\n### ${}\n\n#### Basic usage\n\nThe `${varOrExpression}` tag inserts the value of `varOrExpression` in the template. This is a shortcut for `{{= varOrExpression}}`.\n\n```\n// Template\n<div>${a}</div>\n<div>{{= a}}</div>\n\n// Code\nnew Template(tpl).render({ a: 'kiwi' }, callback);\n\n// Result\n<div>kiwi</div>\n<div>kiwi</div>\n```\n\n#### Filter support\n\nThe `${}` tag optionally supports filters.\n\n```\n// Template\n<div>${a|replace('k', 'w')|capitalize}</div>\n\n// Code\nnew Template(tpl).render({ a: 'kiwi' }, callback);\n\n// Result\n<div>Wiwi</div>\n```\n\n#### Escaping by default\n\nThe `${}` tag escapes its output by default.\n\n```\n// Template\n<div>${a}</div>\n\n// Code\nnew Template(tpl).render({ a: '<b>kiwi</b>' }, callback);\n\n// Result\n<div>&lt;b&gt;kiwi&lt;/b&gt;</div>\n```\n\nYou can optionally insert unescaped data by using the special `raw`filter.\n\n```\n// Template\n<div>${a|raw}</div>\n\n// Code\nnew Template(tpl).render({ a: '<b>kiwi</b>' }, callback);\n\n// Result\n<div><b>kiwi</b></div>\n```\n\n### {{if}}\n\n#### Basic usage\n\nUsed for conditional insertion of content. Renders the content between the opening and closing template tags only if the specified data item field, JavaScript function or expression does not evaluate to false (or to zero, null, type \"undefined\", or the empty string).\n\n```\n// Template\n<div>{{if show}}Foo{{/if}}</div>\n<div>{{if !show}}Bar{{/if}}</div>\n\n// Code\nnew Template(tpl).render({ show:true }, callback);\n\n// Result\n<div>Foo</div>\n<div></div>\n```\n\n#### Alternatives\n\n`{{else}}` can be used in association with the `{{if}}` tag to provide alternative content based on the values of one or more expressions. The `{{else}}` tag can be used without a parameter, as in `{{if a}}...{{else}}...{{/if}}`, or with a parameter, as in `{{if a}}...{{else b}}...{{/if}}`.\n\n```\n// Template\n<div>{{if a === 2}}Moo{{else b === 3}}Foo{{else}}Kiwi{{/if}}</div>\n\n// Code\nnew Template(tpl).render({ a: 1, b: 2 }, callback);\n\n// Result\n<div>Kiwi</div>\n```\n\n### {{each}}\n\n#### Basic usage\n\nUsed to iterate over a data array, and render the content between the opening and closing template tags once for each data item.\n\n```\n// Template\n<ul>\n{{each movies}}\n  <li>${$index|incr}. ${$value}</li>\n{{/each}}\n</ul>\n\n// Code\nnew Template(tpl).render({ movies: [ 'Meet Joe Black', 'City Hunter' ] }, callback);\n\n// Result\n<ul>\n  <li>1. Meet Joe Black</li>\n  <li>2. City Hunter</li>\n</ul>\n```\n\n#### Index and parameter support\n\nThe block of template markup between the opening and closing tags `{{each}}` and `{{/each}}` is rendered once for each data item in the data array. Within this block the `{{each}}` template tag exposes the current index and value as additional template variables $index and $value. These default variable names can be changed by passing in index and value parameters to the `{{each}}` template tag, as in the following example:\n\n```\n// Template\n<ul>\n{{each(i, name) movies}}\n  <li>${i|incr}. ${name}</li>\n{{/each}}\n</ul>\n\n// Code\nnew Template(tpl).render({ movies: [ 'Meet Joe Black', 'City Hunter' ] }, callback);\n\n// Result\n<ul>\n  <li>1. Meet Joe Black</li>\n  <li>2. City Hunter</li>\n</ul>\n```\n\n#### Loop counters\n\nBy default, Kiwi sets a number of variables available within the loop:\n\n* **$each.size**: The number of items in the collection\n* **$each.counter**: The current iteration of the loop (1-indexed)\n* **$each.counter0**: The current iteration of the loop (0-indexed)\n* **$each.revcounter**: The number of iterations from the end of the loop (1-indexed)\n* **$each.revcounter0**: The number of iterations from the end of the loop (0-indexed)\n* **$each.first**: `true` if this is the first time through the loop\n* **$each.last**: `true` if this is the last time through the loop\n* **$each.parentLoop**: For nested loops, this is the loop \"above\" the current one\n\n```\n// Template\n<ul>\n{{each(i, name) movies}}\n  <li>${$each.counter}. ${name}</li>\n{{/each}}\n</ul>\n\n// Code\nnew Template(tpl).render({ movies: [ 'Meet Joe Black', 'City Hunter' ] }, callback);\n\n// Result\n<ul>\n  <li>1. Meet Joe Black</li>\n  <li>2. City Hunter</li>\n</ul>\n```\n\nIn order to maintain compatibility with earlier Kiwi releases, `_eachLoop` is provided as an alias for `$each`. This will be dropped in a next version.\n\n#### Empty clause\n\nThe `{{each}}` tag can take an optional `{{ empty }}` clause that will be displayed if the given collection is empty:\n\n```\n// Template\n<ul>\n{{each(i, name) movies}}\n  <li>${name}</li>\n{{empty}}\n  <li>No movies found…</li>\n{{/each}}\n</ul>\n\n// Code\nnew Template(tpl).render({ movies: [] }, callback);\n\n// Result\n<ul>\n  <li>No movies found…</li>\n</ul>\n```\n\n### {{as}}\n\nThe template markup between the opening and closing tags `{{as}}` and `{{/as}}` is not rendered in the document, but instead saved in a variable for later use.\n\n```\n// Template\n{{as foo}}Kiwi{{/as}}\n<div>${foo}</div>\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div>Kiwi</div>\n```\n\n### {{tmpl}}\n\nUsed for composition of templates. Renders a nested template from a string within the rendered output of the parent template.\n\n```\n// Template\n<div>{{tmpl nested}}</div>\n\n// Code\nnew Template(tpl).render({ nested: '${a}', a: 'Kiwi' }, callback);\n\n// Result\n<div>Kiwi</div>\n```\n\n### {{include}}\n\nUsed for composition of templates. It renders a nested template within the rendered output of the current template.\n\n#### Loading nested template from disk\n\n```\n// foo.kiwi\nHello!\n\n// Template\n<div>{{include \"foo\"}}</div>\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div>Hello!</div>\n```\n\n#### Using directly another `Template` instance\n\n```\n// Template 1\nHello!\n\n// Template 2\n<div>{{include nested}}</div>\n\n// Code\nvar nested = new Template(tpl1);\nnew Template(tpl2).render({ nested: nested }, callback);\n\n// Result\n<div>Hello!</div>\n```\n\n### {{block}}\n\n#### Basic usage\n\nUsed to set separate blocks in your template. This can be used to extract specific portions of your template after rendering, or in combination with `{{extend}}` tag:\n\n```\n// Template\n<div>{{block foo}}Kiwi{{/block}}</div>\n\n// Code\nnew Template(tpl).render({}, function(err, rendered) {\n  console.log('Result:', rendered);\n  console.log('Foo:', rendered.blocks['foo']);\n});\n\n// Result\nResult: <div>Kiwi</div>\nFoo: Kiwi\n```\n\n#### Prepend / append\n\nWhen using block tag with `{{extend}}`, it can be useful to append or prepend block markup to parent template block instead of replacing it. You can use the `append` and `prepend` directives to command this behavior.\n\n```\n// foo.kiwi\nHello, {{block place}}world{{/block}}, dear {{block name}}user{{/block}}!\n\n// Template\n{{extend \"foo\"}}\n{{block place prepend}}big {{/block}}\n{{block name append}} 42{{/block}}\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div>Hello, big world, dear user 42!</div>\n```\n\n#### Parent\n\nWhen using block tag with `{{extend}}`, you may want to inclue parent block markup inside child block. You can use the `{{parent}}` tag to do this.\n\n```\n// foo.kiwi\n{{block greeting}}Welcome!{{/block}}\n\n// Template\n{{extend \"foo\"}}\n{{block greeting}}I just wanted to say « {{parent}} »{{/block}}\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div>I just wanted to say « Welcome! »</div>\n```\n\n\n### {{ifblock}}\n\nThe template markup between the opening and closing tags `{{ifblock}}` and `{{/ifblock}}` is rendered only if the matching block is defined and has content.\n\n```\n// Template\n<div>{{ifblock foo}}Kiwi{{/block}}</div>\n{{block foo}}Hello!{{/block}}\n<div>{{ifblock foo}}Kiwi{{/block}}</div>\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div></div>\n<div>Kiwi</div>\n```\n\n### {{extend}}\n\nThis makes the current template extend another template.\n\n#### Loading parent template from disk\n\n```\n// foo.kiwi\nHello, {{block place}}world{{/block}}!\n\n// Template\n{{extend \"foo\"}}\n{{block place}}kiwi{{/block}}\n\n// Code\nnew Template(tpl2).render({}, callback);\n\n// Result\n<div>Hello, kiwi!</div>\n```\n\n#### Using directly another `Template` instance\n\n```\n// Template 1\nHello, {{block place}}world{{/block}}!\n\n// Template 2\n{{extend parent}}\n{{block place}}kiwi{{/block}}\n\n// Code\nvar parent = new Template(tpl1);\nnew Template(tpl2).render({ parent: parent }, callback);\n\n// Result\n<div>Hello, kiwi!</div>\n```\n\n### {{raw}}\n\nThe compiler won't anything between `{{raw}}` and `{{/raw}}`. This can be useful if you want some parts of your template to be rendered on the client.\n\nFor better compatibility with jqTpl, `{{verbatim}}` is an alias for `{{raw}}`.\n\n```\n// Template\n<div>{{raw}}${a}{{/raw}}</div>\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div>${a}</div>\n```\n\n### {{#}} and { {comment}}\n\nThese tags are comments, which are never rendered.\n\n```\n// Template\n{{# Some comment}}Kiwi{{comment}}Some other comment{{/comment}}\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\nKiwi\n```\n\n\n## Available filters\n\n* escape\n* capitalize\n* upper\n* lower\n* json\n* add\n* subtract\n* mul\n* div\n* cut\n* incr\n* decr\n* addslashes\n* stripslashes\n* first\n* last\n* length\n* reverse\n* join\n* urlencode\n* urldecode\n* replace\n* date\n* relativedate\n* timeago\n\n\n## Express 3.x compatibility\n\nKiwi works out of the box with [Express](http://expressjs.com) 3.x. Here is a (very) basic example:\n\n```javascript\nvar express = require('express');\nvar app = express.createServer();\n\napp.set('view engine', 'kiwi');\n\napp.get('/', function(req, res) {\n  res.render('index', {});\n});\n\napp.listen(3000);\n```\n\n\n## Extensibility\n\n### Create tags\n\nDid we say that Kiwi was extensible with no more than 3 lines of code? Well, we didn't lie. For example, say you want to create a new tag `{{cap}}` which will capitalize its argument. Here is the only thing you'd need to do:\n\n```javascript\nkiwi.tools.createSimpleTag('cap', function(context, name) {\n  return name.toUpperCase();\n});\n```\n\nYou can then use your new tag as any other:\n\n```\n// Template\n<div>{{cap \"kiwi\"}}</div>\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div>KIWI</div>\n```\n\nFor better security, just like with the `${}` tag, all output of custom tags defined that way is escaped by default. If you want your tag to input raw HTML in your document, you can mark the output as safe. For example, let's say you want to create a `{{css}}` tag which will render a `<link>` tag in your document:\n\n```javascript\nkiwi.tools.createSimpleTag('css', function(context, name) {\n  return kiwi.tools.safe('<link rel=\"stylesheet\" type=\"text/css\" href=\"' + name + '\">');\n});\n```\n\nIt's as simple as that.\n\n### Create filters\n\nYou can also create new filters with the same awsomeness. Let's say you want to create a new `prepend` filter. Three lines are enough:\n\n```javascript\nkiwi.tools.createFilter('prepend', function(str, thing) {\n  return thing + str;\n});\n```\n\nYou can then use your new filter as any other:\n\n```\n// Template\n<div>${name|prepend(\"Hello, \")}</div>\n\n// Code\nnew Template(tpl).render({name: 'Kiwi'}, callback);\n\n// Result\n<div>Hello, Kiwi</div>\n```\n\n\n## Using JSHint\n\nIn order to check Kiwi's code with JSHint, just run `make lint` from the Kiwi directory.\n\n\n## Performance tips\n\n* **Use cache in production**\n* **Use strict mode**\nYou can disable strict mode in order to make Kiwi comply with jQuery template / jqTpl behaviour. However, this will result in using a bunch of `try…catch` blocks in the compiled templates, which will definitely lower Kiwi's performance.\nStrict mode is enabled by default.\n* **Avoid using `tmpl`**\nIn order to avoid memory leaks when using heavily dynamic templates in `tmpl`, this tag uses `CappedCache` by default, isolated from the main cache. As a result, if your nested templates are heavily dynamic, a new complete compiler stack is likely to be started each time a `tmpl` tag is met.\nYou may choose to use a standard cache instead, but be aware that this could easily lead to huge memory leaks if your nested templates are heavily dynamic.\nIt is included for compatibility with jQuery templates / jqTpl, but you should probably not use it at all.\n* **Consider disabling `eachLoopCounters`**\nKiwi adds counters to `each` loop, which allows you, for example, to access the current iteration count with `$each.counter`. If you don't need this functionality, disabling it will slightly increase Kiwi's performance when using `each` loops.\n\n\n## License\n\n**Kiwi is released under an MIT license**\n\nCopyright ©2012 Pierre Matri <pierre.matri@coolony.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"kiwi@0.2.0","dist":{"shasum":"b846c534b7adc9965e6b5b93e9e50d6535eb01d1","tarball":"https://registry.npmjs.org/kiwi/-/kiwi-0.2.0.tgz","integrity":"sha512-+iHQX7wp9NCeBosBEiRj3CaMw36fHZ5v+2jMG6f687M12OU7c2+TBlJjGUQyYDQ3X/BNOyKWnruV4OK6xKL+NQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfLMYdQJLZRqyHTfP0lHnF6RxmhpbJV4ixqjCOhdfpDAIgApEHvLOpWo1zwMgaDS3rgCKyRji4FiLStr39RmU426g="}]},"maintainers":[{"name":"coolony","email":"pierre.matri@coolony.com"}]},"0.2.1":{"name":"kiwi","description":"Simple, modular, fast and lightweight template engine, based on jQuery templates syntax.","version":"0.2.1","author":{"name":"Pierre Matri","email":"pierre.matri@coolony.com"},"contributors":[{"name":"Pierre Matri","email":"pierre.matri@coolony.com"}],"dependencies":{"frame":"*","underscore":"*","moment":"*"},"devDependencies":{"mocha":"*","should":"*","uglify-js":"*","jshint":"*"},"keywords":["kiwi","asynchronous","template","web","express","engine","html"],"repository":{"type":"git","url":"git://github.com/coolony/kiwi"},"main":"index","scripts":{"test":"make test"},"engines":{"node":">= 0.6.0"},"readme":"[![Build Status](https://secure.travis-ci.org/coolony/kiwi.png?branch=master)](http://travis-ci.org/coolony/kiwi)\n\n# Kiwi\n\n\n## What is this?\n\nKiwi is a cool JavaScript template engine lovingly built from the ground up for Node.js with performance, extensibility, modularity and security in mind. It is compatible with most of [jQuery Template](http://api.jquery.com/category/plugins/templates/) syntax, and adds lots of features to it. This means Kiwi is:\n\n* **Fast**. Insanely fast.\n* **Completely asynchronous**. You have the absolute guarantee that not a single blocking call will be done after Kiwi has been initialized.\n* **Easily extensible**. Three short lines of code are enough to create a new tag.\n* **Incredibly powerful**, even for advanced features. Want dynamic template inheritance? Access individual block contents? Done!\n* **Easy to set up**. One line of code and you can get started on [Express](http://expressjs.com) 3.x. In most cases, you can even use your existing jQuery or [jqTpl](https://github.com/kof/node-jqtpl) templates without modification.\n* **Robust**. Kiwi is carefully tested before any change is pushed to the repository.\n* **Full-featured**. Lots of filters are available, and it can't be easier to add your own if you want.\n* **Secure**. All output is escaped by default.\n* **Clean**. Kiwi won't mess with your prototypes, and won't extend any of the built-in JavaScript objects.\n* **Good looking**. Kiwi is tested with [JSHint](https://github.com/jshint/node-jshint/) to ensure code quality.\n\n\nAs an additional feature, you can use Kiwi in client mode, with – almost – all features available, except for the few involving the file system.\n\n\n## Syntax example\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <title>${title}</title>\n  </head>\n  <body>\n    <p>\n      {{if name}}\n        Hello, ${name|capitalize}!\n      {{else}}\n        Hello, dear unknown!\n      {{/if}}\n    </p>\n  </body>\n</html>\n```\n\nPlease note this example template expects `name` and `title` variables to always be defined.\n\n\n## Server-side installation\n\n### Latest release\n\n```bash\nnpm install kiwi\n```\n\n### Development version (may not be suited for production [yet])\n\n```bash\nnpm install https://github.com/coolony/kiwi/tarball/master\n```\n\n## Usage\n\n### Loading a template from string\n\n```javascript\nvar kiwi = require('kiwi');\n\nvar template = '<p>Hello, ${name}!</p>';\nnew kiwi.Template(template).render({ name: \"Kiwi\" }, function onRendered(err, rendered) {\n  console.log('Rendered template is: ' + rendered);\n});\n```\n\n### Loading a template from disk\n\n```javascript\nvar kiwi = require('kiwi');\n\nvar template = new kiwi.Template().loadFile('template.kiwi', function onLoaded(err) {\n  template.render({ name: \"Kiwi\" }, function onRendered(err, rendered) {\n    console.log('Rendered template is: ' + rendered);\n  });\n});\n```\n\nIn order to make the process of loading and rendering a template easier, Kiwi does expose a handy `loadAndRender`shortcut:\n\n```javascript\nvar kiwi = require('kiwi');\n\nvar template = new kiwi.Template().loadAndRender('template.kiwi', { name: \"Kiwi\" }, function onRendered(err, rendered) {\n  console.log('Rendered template is: ' + rendered);\n});\n```\n\n### Client-side dependencies\n\nPlease note that client-side usage requires [Underscore.js](http://underscorejs.org/) to be included in the page. This requirement will be removed in a future release.\n\n\n## Accessing variables\n\nEvery key of the optional object passed as argument to the `Template#render` method will be made available for use in your template. You can also access your object with `$data`.\n\nFor example, when passing `{ name: 'Kiwi'}`, you will be able to use the `name` variable in your template, or `$data.name`.\n\n\n## Available tags\n\n### ${}\n\n#### Basic usage\n\nThe `${varOrExpression}` tag inserts the value of `varOrExpression` in the template. This is a shortcut for `{{= varOrExpression}}`.\n\n```\n// Template\n<div>${a}</div>\n<div>{{= a}}</div>\n\n// Code\nnew Template(tpl).render({ a: 'kiwi' }, callback);\n\n// Result\n<div>kiwi</div>\n<div>kiwi</div>\n```\n\n#### Filter support\n\nThe `${}` tag optionally supports filters.\n\n```\n// Template\n<div>${a|replace('k', 'w')|capitalize}</div>\n\n// Code\nnew Template(tpl).render({ a: 'kiwi' }, callback);\n\n// Result\n<div>Wiwi</div>\n```\n\n#### Escaping by default\n\nThe `${}` tag escapes its output by default.\n\n```\n// Template\n<div>${a}</div>\n\n// Code\nnew Template(tpl).render({ a: '<b>kiwi</b>' }, callback);\n\n// Result\n<div>&lt;b&gt;kiwi&lt;/b&gt;</div>\n```\n\nYou can optionally insert unescaped data by using the special `raw`filter.\n\n```\n// Template\n<div>${a|raw}</div>\n\n// Code\nnew Template(tpl).render({ a: '<b>kiwi</b>' }, callback);\n\n// Result\n<div><b>kiwi</b></div>\n```\n\n### {{if}}\n\n#### Basic usage\n\nUsed for conditional insertion of content. Renders the content between the opening and closing template tags only if the specified data item field, JavaScript function or expression does not evaluate to false (or to zero, null, type \"undefined\", or the empty string).\n\n```\n// Template\n<div>{{if show}}Foo{{/if}}</div>\n<div>{{if !show}}Bar{{/if}}</div>\n\n// Code\nnew Template(tpl).render({ show:true }, callback);\n\n// Result\n<div>Foo</div>\n<div></div>\n```\n\n#### Alternatives\n\n`{{else}}` can be used in association with the `{{if}}` tag to provide alternative content based on the values of one or more expressions. The `{{else}}` tag can be used without a parameter, as in `{{if a}}...{{else}}...{{/if}}`, or with a parameter, as in `{{if a}}...{{else b}}...{{/if}}`.\n\n```\n// Template\n<div>{{if a === 2}}Moo{{else b === 3}}Foo{{else}}Kiwi{{/if}}</div>\n\n// Code\nnew Template(tpl).render({ a: 1, b: 2 }, callback);\n\n// Result\n<div>Kiwi</div>\n```\n\n### {{each}}\n\n#### Basic usage\n\nUsed to iterate over a data array, and render the content between the opening and closing template tags once for each data item.\n\n```\n// Template\n<ul>\n{{each movies}}\n  <li>${$index|incr}. ${$value}</li>\n{{/each}}\n</ul>\n\n// Code\nnew Template(tpl).render({ movies: [ 'Meet Joe Black', 'City Hunter' ] }, callback);\n\n// Result\n<ul>\n  <li>1. Meet Joe Black</li>\n  <li>2. City Hunter</li>\n</ul>\n```\n\n#### Index and parameter support\n\nThe block of template markup between the opening and closing tags `{{each}}` and `{{/each}}` is rendered once for each data item in the data array. Within this block the `{{each}}` template tag exposes the current index and value as additional template variables $index and $value. These default variable names can be changed by passing in index and value parameters to the `{{each}}` template tag, as in the following example:\n\n```\n// Template\n<ul>\n{{each(i, name) movies}}\n  <li>${i|incr}. ${name}</li>\n{{/each}}\n</ul>\n\n// Code\nnew Template(tpl).render({ movies: [ 'Meet Joe Black', 'City Hunter' ] }, callback);\n\n// Result\n<ul>\n  <li>1. Meet Joe Black</li>\n  <li>2. City Hunter</li>\n</ul>\n```\n\n#### Loop counters\n\nBy default, Kiwi sets a number of variables available within the loop:\n\n* **$each.size**: The number of items in the collection\n* **$each.counter**: The current iteration of the loop (1-indexed)\n* **$each.counter0**: The current iteration of the loop (0-indexed)\n* **$each.revcounter**: The number of iterations from the end of the loop (1-indexed)\n* **$each.revcounter0**: The number of iterations from the end of the loop (0-indexed)\n* **$each.first**: `true` if this is the first time through the loop\n* **$each.last**: `true` if this is the last time through the loop\n* **$each.parent**: For nested loops, this is the loop \"above\" the current one\n* **$each.parentIndex**: For nested loops, this is the current index of the parent loop\n* **$each.parentValue**: For nested loops, this is the current value of the parent loop\n\n```\n// Template\n<ul>\n{{each(i, name) movies}}\n  <li>${$each.counter}. ${name}</li>\n{{/each}}\n</ul>\n\n// Code\nnew Template(tpl).render({ movies: [ 'Meet Joe Black', 'City Hunter' ] }, callback);\n\n// Result\n<ul>\n  <li>1. Meet Joe Black</li>\n  <li>2. City Hunter</li>\n</ul>\n```\n\nIn order to maintain compatibility with earlier Kiwi releases, `_eachLoop` is provided as an alias for `$each`. This will be dropped in a next version.\n\n#### Empty clause\n\nThe `{{each}}` tag can take an optional `{{ empty }}` clause that will be displayed if the given collection is empty:\n\n```\n// Template\n<ul>\n{{each(i, name) movies}}\n  <li>${name}</li>\n{{empty}}\n  <li>No movies found…</li>\n{{/each}}\n</ul>\n\n// Code\nnew Template(tpl).render({ movies: [] }, callback);\n\n// Result\n<ul>\n  <li>No movies found…</li>\n</ul>\n```\n\n### {{as}}\n\nThe template markup between the opening and closing tags `{{as}}` and `{{/as}}` is not rendered in the document, but instead saved in a variable for later use.\n\n```\n// Template\n{{as foo}}Kiwi{{/as}}\n<div>${foo}</div>\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div>Kiwi</div>\n```\n\n### {{tmpl}}\n\nUsed for composition of templates. Renders a nested template from a string within the rendered output of the parent template.\n\n```\n// Template\n<div>{{tmpl nested}}</div>\n\n// Code\nnew Template(tpl).render({ nested: '${a}', a: 'Kiwi' }, callback);\n\n// Result\n<div>Kiwi</div>\n```\n\n### {{include}}\n\nUsed for composition of templates. It renders a nested template within the rendered output of the current template.\n\n#### Loading nested template from disk\n\n```\n// foo.kiwi\nHello!\n\n// Template\n<div>{{include \"foo\"}}</div>\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div>Hello!</div>\n```\n\n#### Using directly another `Template` instance\n\n```\n// Template 1\nHello!\n\n// Template 2\n<div>{{include nested}}</div>\n\n// Code\nvar nested = new Template(tpl1);\nnew Template(tpl2).render({ nested: nested }, callback);\n\n// Result\n<div>Hello!</div>\n```\n\n### {{block}}\n\n#### Basic usage\n\nUsed to set separate blocks in your template. This can be used to extract specific portions of your template after rendering, or in combination with `{{extend}}` tag:\n\n```\n// Template\n<div>{{block foo}}Kiwi{{/block}}</div>\n\n// Code\nnew Template(tpl).render({}, function(err, rendered) {\n  console.log('Result:', rendered);\n  console.log('Foo:', rendered.blocks['foo']);\n});\n\n// Result\nResult: <div>Kiwi</div>\nFoo: Kiwi\n```\n\n#### Prepend / append\n\nWhen using block tag with `{{extend}}`, it can be useful to append or prepend block markup to parent template block instead of replacing it. You can use the `append` and `prepend` directives to command this behavior.\n\n```\n// foo.kiwi\nHello, {{block place}}world{{/block}}, dear {{block name}}user{{/block}}!\n\n// Template\n{{extend \"foo\"}}\n{{block place prepend}}big {{/block}}\n{{block name append}} 42{{/block}}\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div>Hello, big world, dear user 42!</div>\n```\n\n#### Parent\n\nWhen using block tag with `{{extend}}`, you may want to inclue parent block markup inside child block. You can use the `{{parent}}` tag to do this.\n\n```\n// foo.kiwi\n{{block greeting}}Welcome!{{/block}}\n\n// Template\n{{extend \"foo\"}}\n{{block greeting}}I just wanted to say « {{parent}} »{{/block}}\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div>I just wanted to say « Welcome! »</div>\n```\n\n\n### {{ifblock}}\n\nThe template markup between the opening and closing tags `{{ifblock}}` and `{{/ifblock}}` is rendered only if the matching block is defined and has content.\n\n```\n// Template\n<div>{{ifblock foo}}Kiwi{{/block}}</div>\n{{block foo}}Hello!{{/block}}\n<div>{{ifblock foo}}Kiwi{{/block}}</div>\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div></div>\n<div>Kiwi</div>\n```\n\n### {{extend}}\n\nThis makes the current template extend another template.\n\n#### Loading parent template from disk\n\n```\n// foo.kiwi\nHello, {{block place}}world{{/block}}!\n\n// Template\n{{extend \"foo\"}}\n{{block place}}kiwi{{/block}}\n\n// Code\nnew Template(tpl2).render({}, callback);\n\n// Result\n<div>Hello, kiwi!</div>\n```\n\n#### Using directly another `Template` instance\n\n```\n// Template 1\nHello, {{block place}}world{{/block}}!\n\n// Template 2\n{{extend parent}}\n{{block place}}kiwi{{/block}}\n\n// Code\nvar parent = new Template(tpl1);\nnew Template(tpl2).render({ parent: parent }, callback);\n\n// Result\n<div>Hello, kiwi!</div>\n```\n\n### {{raw}}\n\nThe compiler won't anything between `{{raw}}` and `{{/raw}}`. This can be useful if you want some parts of your template to be rendered on the client.\n\nFor better compatibility with jqTpl, `{{verbatim}}` is an alias for `{{raw}}`.\n\n```\n// Template\n<div>{{raw}}${a}{{/raw}}</div>\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div>${a}</div>\n```\n\n### {{#}} and { {comment}}\n\nThese tags are comments, which are never rendered.\n\n```\n// Template\n{{# Some comment}}Kiwi{{comment}}Some other comment{{/comment}}\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\nKiwi\n```\n\n\n## Available filters\n\n* escape\n* capitalize\n* upper\n* lower\n* json\n* add\n* subtract\n* mul\n* div\n* cut\n* incr\n* decr\n* addslashes\n* stripslashes\n* first\n* last\n* length\n* reverse\n* join\n* urlencode\n* urldecode\n* replace\n* date\n* relativedate\n* timeago\n\n\n## Express 3.x compatibility\n\nKiwi works out of the box with [Express](http://expressjs.com) 3.x. Here is a (very) basic example:\n\n```javascript\nvar express = require('express');\nvar app = express.createServer();\n\napp.set('view engine', 'kiwi');\n\napp.get('/', function(req, res) {\n  res.render('index', {});\n});\n\napp.listen(3000);\n```\n\n\n## Extensibility\n\n### Create tags\n\nDid we say that Kiwi was extensible with no more than 3 lines of code? Well, we didn't lie. For example, say you want to create a new tag `{{cap}}` which will capitalize its argument. Here is the only thing you'd need to do:\n\n```javascript\nkiwi.tools.createSimpleTag('cap', function(context, name) {\n  return name.toUpperCase();\n});\n```\n\nYou can then use your new tag as any other:\n\n```\n// Template\n<div>{{cap \"kiwi\"}}</div>\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div>KIWI</div>\n```\n\nFor better security, just like with the `${}` tag, all output of custom tags defined that way is escaped by default. If you want your tag to input raw HTML in your document, you can mark the output as safe. For example, let's say you want to create a `{{css}}` tag which will render a `<link>` tag in your document:\n\n```javascript\nkiwi.tools.createSimpleTag('css', function(context, name) {\n  return kiwi.tools.safe('<link rel=\"stylesheet\" type=\"text/css\" href=\"' + name + '\">');\n});\n```\n\nIt's as simple as that.\n\n### Create filters\n\nYou can also create new filters with the same awsomeness. Let's say you want to create a new `prepend` filter. Three lines are enough:\n\n```javascript\nkiwi.tools.createFilter('prepend', function(str, thing) {\n  return thing + str;\n});\n```\n\nYou can then use your new filter as any other:\n\n```\n// Template\n<div>${name|prepend(\"Hello, \")}</div>\n\n// Code\nnew Template(tpl).render({name: 'Kiwi'}, callback);\n\n// Result\n<div>Hello, Kiwi</div>\n```\n\n\n## Using JSHint\n\nIn order to check Kiwi's code with JSHint, just run `make lint` from the Kiwi directory.\n\n\n## Performance tips\n\n* **Use cache in production**\n* **Use strict mode**\nYou can disable strict mode in order to make Kiwi comply with jQuery template / jqTpl behaviour. However, this will result in using a bunch of `try…catch` blocks in the compiled templates, which will definitely lower Kiwi's performance.\nStrict mode is enabled by default.\n* **Avoid using `tmpl`**\nIn order to avoid memory leaks when using heavily dynamic templates in `tmpl`, this tag uses `CappedCache` by default, isolated from the main cache. As a result, if your nested templates are heavily dynamic, a new complete compiler stack is likely to be started each time a `tmpl` tag is met.\nYou may choose to use a standard cache instead, but be aware that this could easily lead to huge memory leaks if your nested templates are heavily dynamic.\nIt is included for compatibility with jQuery templates / jqTpl, but you should probably not use it at all.\n* **Consider disabling `eachLoopCounters`**\nKiwi adds counters to `each` loop, which allows you, for example, to access the current iteration count with `$each.counter`. If you don't need this functionality, disabling it will slightly increase Kiwi's performance when using `each` loops.\n\n\n## License\n\n**Kiwi is released under an MIT license**\n\nCopyright ©2012 Pierre Matri <pierre.matri@coolony.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"kiwi@0.2.1","dist":{"shasum":"66a89fbb955931f2ab900ca52eead3af0b4556af","tarball":"https://registry.npmjs.org/kiwi/-/kiwi-0.2.1.tgz","integrity":"sha512-3wrSSW1uT0aHVmU6P++uvHgkKZdmQbOi21WyTtuWXsbFjWwVWqUaWDUAZiThs508hgOoplWjD3KDByGfjoGBQQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGocwkps5Pis58Sbojii72GzJn+3W7GGQ8jDh4GMJUERAiEA9pn09LoeFqbAmXqUAfetvovaO6LB+B/xUW8NC3pvuPw="}]},"maintainers":[{"name":"coolony","email":"pierre.matri@coolony.com"}]},"0.2.2":{"name":"kiwi","description":"Simple, modular, fast and lightweight template engine, based on jQuery templates syntax.","version":"0.2.2","author":{"name":"Pierre Matri","email":"pierre.matri@coolony.com"},"contributors":[{"name":"Pierre Matri","email":"pierre.matri@coolony.com"}],"dependencies":{"frame":"*","underscore":"*","moment":"*"},"devDependencies":{"mocha":"*","should":"*","uglify-js":"*","jshint":"*","commander":"*"},"keywords":["kiwi","asynchronous","template","web","express","engine","html"],"repository":{"type":"git","url":"git://github.com/coolony/kiwi"},"main":"index","scripts":{"test":"make test"},"engines":{"node":">= 0.6.0"},"readme":"[![Build Status](https://secure.travis-ci.org/coolony/kiwi.png?branch=master)](http://travis-ci.org/coolony/kiwi)\n\n# Kiwi\n\n\n## What is this?\n\nKiwi is a cool JavaScript template engine lovingly built from the ground up for Node.js with performance, extensibility, modularity and security in mind. It is compatible with most of [jQuery Template](http://api.jquery.com/category/plugins/templates/) syntax, and adds lots of features to it. This means Kiwi is:\n\n* **Fast**. Insanely fast.\n* **Completely asynchronous**. You have the absolute guarantee that not a single blocking call will be done after Kiwi has been initialized.\n* **Easily extensible**. Three short lines of code are enough to create a new tag.\n* **Incredibly powerful**, even for advanced features. Want dynamic template inheritance? Access individual block contents? Done!\n* **Easy to set up**. One line of code and you can get started on [Express](http://expressjs.com) 3.x. In most cases, you can even use your existing jQuery or [jqTpl](https://github.com/kof/node-jqtpl) templates without modification.\n* **Robust**. Kiwi is carefully tested before any change is pushed to the repository.\n* **Full-featured**. Lots of filters are available, and it can't be easier to add your own if you want.\n* **Secure**. All output is escaped by default.\n* **Clean**. Kiwi won't mess with your prototypes, and won't extend any of the built-in JavaScript objects.\n* **Good looking**. Kiwi is tested with [JSHint](https://github.com/jshint/node-jshint/) to ensure code quality.\n\n\nAs an additional feature, you can use Kiwi in client mode, with – almost – all features available, except for the few involving the file system.\n\n\n## Syntax example\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <title>${title}</title>\n  </head>\n  <body>\n    <p>\n      {{if name}}\n        Hello, ${name|capitalize}!\n      {{else}}\n        Hello, dear unknown!\n      {{/if}}\n    </p>\n  </body>\n</html>\n```\n\nPlease note this example template expects `name` and `title` variables to always be defined.\n\n\n## Server-side installation\n\n### Latest release\n\n```bash\nnpm install kiwi\n```\n\n### Development version (may not be suited for production [yet])\n\n```bash\nnpm install https://github.com/coolony/kiwi/tarball/master\n```\n\n## Client-side installation\n\n### Self-hosted\n\nJust include `kiwi.min.js`, and you're good to go!\n\n### Client-side CDN version\n\nKiwi is also available as a CDN-hosted version, for free, courtesy of CDNJS / CloudFlare.\n\n```html\n<script type=\"text/javascript\" src=\"//cdnjs.cloudflare.com/ajax/libs/kiwi/0.2.1/kiwi.min.js\"></script>\n```\n\n### Client-side dependencies\n\nPlease note that client-side usage requires [Underscore.js](http://underscorejs.org/) to be included in the page. This requirement will be removed in a future release.\n\n## Usage\n\n### Loading a template from string\n\n```javascript\nvar kiwi = require('kiwi');\n\nvar template = '<p>Hello, ${name}!</p>';\nnew kiwi.Template(template).render({ name: \"Kiwi\" }, function onRendered(err, rendered) {\n  console.log('Rendered template is: ' + rendered);\n});\n```\n\n### Loading a template from disk\n\n```javascript\nvar kiwi = require('kiwi');\n\nvar template = new kiwi.Template().loadFile('template.kiwi', function onLoaded(err) {\n  template.render({ name: \"Kiwi\" }, function onRendered(err, rendered) {\n    console.log('Rendered template is: ' + rendered);\n  });\n});\n```\n\nIn order to make the process of loading and rendering a template easier, Kiwi does expose a handy `loadAndRender`shortcut:\n\n```javascript\nvar kiwi = require('kiwi');\n\nvar template = new kiwi.Template().loadAndRender('template.kiwi', { name: \"Kiwi\" }, function onRendered(err, rendered) {\n  console.log('Rendered template is: ' + rendered);\n});\n```\n\n\n## Accessing variables\n\nEvery key of the optional object passed as argument to the `Template#render` method will be made available for use in your template. You can also access your object with `$data`.\n\nFor example, when passing `{ name: 'Kiwi'}`, you will be able to use the `name` variable in your template, or `$data.name`.\n\n\n## Available tags\n\n### ${}\n\n#### Basic usage\n\nThe `${varOrExpression}` tag inserts the value of `varOrExpression` in the template. This is a shortcut for `{{= varOrExpression}}`.\n\n```\n// Template\n<div>${a}</div>\n<div>{{= a}}</div>\n\n// Code\nnew Template(tpl).render({ a: 'kiwi' }, callback);\n\n// Result\n<div>kiwi</div>\n<div>kiwi</div>\n```\n\n#### Filter support\n\nThe `${}` tag optionally supports filters.\n\n```\n// Template\n<div>${a|replace('k', 'w')|capitalize}</div>\n\n// Code\nnew Template(tpl).render({ a: 'kiwi' }, callback);\n\n// Result\n<div>Wiwi</div>\n```\n\n#### Escaping by default\n\nThe `${}` tag escapes its output by default.\n\n```\n// Template\n<div>${a}</div>\n\n// Code\nnew Template(tpl).render({ a: '<b>kiwi</b>' }, callback);\n\n// Result\n<div>&lt;b&gt;kiwi&lt;/b&gt;</div>\n```\n\nYou can optionally insert unescaped data by using the special `raw`filter.\n\n```\n// Template\n<div>${a|raw}</div>\n\n// Code\nnew Template(tpl).render({ a: '<b>kiwi</b>' }, callback);\n\n// Result\n<div><b>kiwi</b></div>\n```\n\n### {{if}}\n\n#### Basic usage\n\nUsed for conditional insertion of content. Renders the content between the opening and closing template tags only if the specified data item field, JavaScript function or expression does not evaluate to false (or to zero, null, type \"undefined\", or the empty string).\n\n```\n// Template\n<div>{{if show}}Foo{{/if}}</div>\n<div>{{if !show}}Bar{{/if}}</div>\n\n// Code\nnew Template(tpl).render({ show:true }, callback);\n\n// Result\n<div>Foo</div>\n<div></div>\n```\n\n#### Alternatives\n\n`{{else}}` can be used in association with the `{{if}}` tag to provide alternative content based on the values of one or more expressions. The `{{else}}` tag can be used without a parameter, as in `{{if a}}...{{else}}...{{/if}}`, or with a parameter, as in `{{if a}}...{{else b}}...{{/if}}`.\n\n```\n// Template\n<div>{{if a === 2}}Moo{{else b === 3}}Foo{{else}}Kiwi{{/if}}</div>\n\n// Code\nnew Template(tpl).render({ a: 1, b: 2 }, callback);\n\n// Result\n<div>Kiwi</div>\n```\n\n### {{each}}\n\n#### Basic usage\n\nUsed to iterate over a data array, and render the content between the opening and closing template tags once for each data item.\n\n```\n// Template\n<ul>\n{{each movies}}\n  <li>${$index|incr}. ${$value}</li>\n{{/each}}\n</ul>\n\n// Code\nnew Template(tpl).render({ movies: [ 'Meet Joe Black', 'City Hunter' ] }, callback);\n\n// Result\n<ul>\n  <li>1. Meet Joe Black</li>\n  <li>2. City Hunter</li>\n</ul>\n```\n\n#### Index and parameter support\n\nThe block of template markup between the opening and closing tags `{{each}}` and `{{/each}}` is rendered once for each data item in the data array. Within this block the `{{each}}` template tag exposes the current index and value as additional template variables $index and $value. These default variable names can be changed by passing in index and value parameters to the `{{each}}` template tag, as in the following example:\n\n```\n// Template\n<ul>\n{{each(i, name) movies}}\n  <li>${i|incr}. ${name}</li>\n{{/each}}\n</ul>\n\n// Code\nnew Template(tpl).render({ movies: [ 'Meet Joe Black', 'City Hunter' ] }, callback);\n\n// Result\n<ul>\n  <li>1. Meet Joe Black</li>\n  <li>2. City Hunter</li>\n</ul>\n```\n\n#### Loop counters\n\nBy default, Kiwi sets a number of variables available within the loop:\n\n* `$each.size`: The number of items in the collection\n* `$each.counter`: The current iteration of the loop (1-indexed)\n* `$each.counter0`: The current iteration of the loop (0-indexed)\n* `$each.revcounter`: The number of iterations from the end of the loop (1-indexed)\n* `$each.revcounter0`: The number of iterations from the end of the loop (0-indexed)\n* `$each.first`: `true` if this is the first time through the loop\n* `$each.last`: `true` if this is the last time through the loop\n* `$each.parent`: For nested loops, this is the loop \"above\" the current one\n* `$each.parentIndex`: For nested loops, this is the current index of the parent loop\n* `$each.parentValue`: For nested loops, this is the current value of the parent loop\n\n```\n// Template\n<ul>\n{{each(i, name) movies}}\n  <li>${$each.counter}. ${name}</li>\n{{/each}}\n</ul>\n\n// Code\nnew Template(tpl).render({ movies: [ 'Meet Joe Black', 'City Hunter' ] }, callback);\n\n// Result\n<ul>\n  <li>1. Meet Joe Black</li>\n  <li>2. City Hunter</li>\n</ul>\n```\n\nIn order to maintain compatibility with earlier Kiwi releases, `_eachLoop` is provided as an alias for `$each`, and `$each.parentLoop` as an alias for `$each.parent`. This will be dropped in a future release.\n\n#### Empty clause\n\nThe `{{each}}` tag can take an optional `{{ empty }}` clause that will be displayed if the given collection is empty:\n\n```\n// Template\n<ul>\n{{each(i, name) movies}}\n  <li>${name}</li>\n{{empty}}\n  <li>No movies found…</li>\n{{/each}}\n</ul>\n\n// Code\nnew Template(tpl).render({ movies: [] }, callback);\n\n// Result\n<ul>\n  <li>No movies found…</li>\n</ul>\n```\n\n### {{as}}\n\nThe template markup between the opening and closing tags `{{as}}` and `{{/as}}` is not rendered in the document, but instead saved in a variable for later use.\n\n```\n// Template\n{{as foo}}Kiwi{{/as}}\n<div>${foo}</div>\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div>Kiwi</div>\n```\n\n### {{tmpl}}\n\nUsed for composition of templates. Renders a nested template from a string within the rendered output of the parent template.\n\n```\n// Template\n<div>{{tmpl nested}}</div>\n\n// Code\nnew Template(tpl).render({ nested: '${a}', a: 'Kiwi' }, callback);\n\n// Result\n<div>Kiwi</div>\n```\n\n### {{include}}\n\nUsed for composition of templates. It renders a nested template within the rendered output of the current template.\n\n#### Loading nested template from disk\n\n```\n// foo.kiwi\nHello!\n\n// Template\n<div>{{include \"foo\"}}</div>\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div>Hello!</div>\n```\n\n#### Using directly another `Template` instance\n\n```\n// Template 1\nHello!\n\n// Template 2\n<div>{{include nested}}</div>\n\n// Code\nvar nested = new Template(tpl1);\nnew Template(tpl2).render({ nested: nested }, callback);\n\n// Result\n<div>Hello!</div>\n```\n\n#### Passing additional context to parent template\n\n```\n// foo.kiwi\nHello, ${name}!\n\n// Template\n<div>${name} says: {{include \"foo\" childContext}}</div>\n\n// Code\nnew Template(tpl).render({ name: 'Tom', childContext: { name: 'Bob' }}, callback);\n\n// Result\n<div>Tom says: Hello, Bob!</div>\n```\n\n### {{block}}\n\n#### Basic usage\n\nUsed to set separate blocks in your template. This can be used to extract specific portions of your template after rendering, or in combination with `{{extend}}` tag:\n\n```\n// Template\n<div>{{block foo}}Kiwi{{/block}}</div>\n\n// Code\nnew Template(tpl).render({}, function(err, rendered) {\n  console.log('Result:', rendered);\n  console.log('Foo:', rendered.blocks['foo']);\n});\n\n// Result\nResult: <div>Kiwi</div>\nFoo: Kiwi\n```\n\n#### Prepend / append\n\nWhen using block tag with `{{extend}}`, it can be useful to append or prepend block markup to parent template block instead of replacing it. You can use the `append` and `prepend` directives to command this behavior.\n\n```\n// foo.kiwi\nHello, {{block place}}world{{/block}}, dear {{block name}}user{{/block}}!\n\n// Template\n{{extend \"foo\"}}\n{{block place prepend}}big {{/block}}\n{{block name append}} 42{{/block}}\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\nHello, big world, dear user 42!\n```\n\n#### Parent\n\nWhen using block tag with `{{extend}}`, you may want to inclue parent block markup inside child block. You can use the `{{parent}}` tag to do this.\n\n```\n// foo.kiwi\n{{block greeting}}Welcome!{{/block}}\n\n// Template\n{{extend \"foo\"}}\n{{block greeting}}I just wanted to say « {{parent}} »{{/block}}\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\nI just wanted to say « Welcome! »\n```\n\n\n### {{ifblock}}\n\nThe template markup between the opening and closing tags `{{ifblock}}` and `{{/ifblock}}` is rendered only if the matching block is defined and has content.\n\n```\n// Template\n<div>{{ifblock foo}}Kiwi{{/block}}</div>\n{{block foo}}Hello!{{/block}}\n<div>{{ifblock foo}}Kiwi{{/block}}</div>\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div></div>\n<div>Kiwi</div>\n```\n\n### {{extend}}\n\nThis makes the current template extend another template.\n\n#### Loading parent template from disk\n\n```\n// foo.kiwi\nHello, {{block place}}world{{/block}}!\n\n// Template\n{{extend \"foo\"}}\n{{block place}}kiwi{{/block}}\n\n// Code\nnew Template(tpl2).render({}, callback);\n\n// Result\nHello, kiwi!\n```\n\n#### Using directly another `Template` instance\n\n```\n// Template 1\nHello, {{block place}}world{{/block}}!\n\n// Template 2\n{{extend parent}}\n{{block place}}kiwi{{/block}}\n\n// Code\nvar parent = new Template(tpl1);\nnew Template(tpl2).render({ parent: parent }, callback);\n\n// Result\nHello, kiwi!\n```\n\n#### Passing additional context to parent template\n\n```\n// foo.kiwi\n${name} says: {{block message}}Nothing...{{/block}}!\n\n// Template\n{{extend parent parentContext}}\n{{block place}}Hello, ${name}{{/block}}\n\n// Code\nnew Template(tpl).render({ name: 'Tom', parentContext: { message: 'Bob' }}, callback);\n\n// Result\nBob says: Hello, Tom!\n```\n\n### {{raw}}\n\nThe compiler won't anything between `{{raw}}` and `{{/raw}}`. This can be useful if you want some parts of your template to be rendered on the client.\n\nFor better compatibility with jqTpl, `{{verbatim}}` is an alias for `{{raw}}`.\n\n```\n// Template\n<div>{{raw}}${a}{{/raw}}</div>\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div>${a}</div>\n```\n\n### {{#}} and {{comment}}\n\nThese tags are comments, which are never rendered.\n\n```\n// Template\n{{# Some comment}}Kiwi{{comment}}Some other comment{{/comment}}\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\nKiwi\n```\n\n### {{filter}}\n\nThe specified filters will be applied to the rendered markup between `{{filter}}` and `{{/filter}}`.\n\n```\n// Template\n{{filter upper|replace('K', 'W')}}Kiwi{{/filter}}\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\nWIWI\n```\n\n\n## Available filters\n\n* escape\n* capitalize\n* upper\n* lower\n* json\n* add\n* subtract\n* mul\n* div\n* cut\n* incr\n* decr\n* addslashes\n* stripslashes\n* first\n* last\n* length\n* reverse\n* join\n* urlencode\n* urldecode\n* replace\n* date\n* relativedate\n* timeago\n\n\n## Express 3.x compatibility\n\nKiwi works out of the box with [Express](http://expressjs.com) 3.x. Here is a (very) basic example:\n\n```javascript\nvar express = require('express');\nvar app = express.createServer();\n\napp.set('view engine', 'kiwi');\n\napp.get('/', function(req, res) {\n  res.render('index', {});\n});\n\napp.listen(3000);\n```\n\n\n## Extensibility\n\n### Create tags\n\nDid we say that Kiwi was extensible with no more than 3 lines of code? Well, we didn't lie. For example, say you want to create a new tag `{{cap}}` which will capitalize its argument. Here is the only thing you'd need to do:\n\n```javascript\nkiwi.tools.createSimpleTag('cap', function(context, name) {\n  return name.toUpperCase();\n});\n```\n\nYou can then use your new tag as any other:\n\n```\n// Template\n<div>{{cap \"kiwi\"}}</div>\n\n// Code\nnew Template(tpl).render({}, callback);\n\n// Result\n<div>KIWI</div>\n```\n\nFor better security, just like with the `${}` tag, all output of custom tags defined that way is escaped by default. If you want your tag to input raw HTML in your document, you can mark the output as safe. For example, let's say you want to create a `{{css}}` tag which will render a `<link>` tag in your document:\n\n```javascript\nkiwi.tools.createSimpleTag('css', function(context, name) {\n  return kiwi.tools.safe('<link rel=\"stylesheet\" type=\"text/css\" href=\"' + name + '\">');\n});\n```\n\nIt's as simple as that.\n\n### Create filters\n\nYou can also create new filters with the same awsomeness. Let's say you want to create a new `prepend` filter. Three lines are enough:\n\n```javascript\nkiwi.tools.createFilter('prepend', function(str, thing) {\n  return thing + str;\n});\n```\n\nYou can then use your new filter as any other:\n\n```\n// Template\n<div>${name|prepend(\"Hello, \")}</div>\n\n// Code\nnew Template(tpl).render({name: 'Kiwi'}, callback);\n\n// Result\n<div>Hello, Kiwi</div>\n```\n\n\n## Using JSHint\n\nIn order to check Kiwi's code with JSHint, just run `make lint` from the Kiwi directory.\n\n\n## Performance tips\n\n* **Use cache in production**\n* **Use strict mode**\nYou can disable strict mode in order to make Kiwi comply with jQuery template / jqTpl behaviour. However, this will result in using a bunch of `try…catch` blocks in the compiled templates, which will definitely lower Kiwi's performance.\nStrict mode is enabled by default.\n* **Avoid using `tmpl`**\nIn order to avoid memory leaks when using heavily dynamic templates in `tmpl`, this tag uses `CappedCache` by default, isolated from the main cache. As a result, if your nested templates are heavily dynamic, a new complete compiler stack is likely to be started each time a `tmpl` tag is met.\nYou may choose to use a standard cache instead, but be aware that this could easily lead to huge memory leaks if your nested templates are heavily dynamic.\nIt is included for compatibility with jQuery templates / jqTpl, but you should probably not use it at all.\n* **Consider disabling `eachLoopCounters`**\nKiwi adds counters to `each` loop, which allows you, for example, to access the current iteration count with `$each.counter`. If you don't need this functionality, disabling it will slightly increase Kiwi's performance when using `each` loops.\n\n\n## License\n\n**Kiwi is released under an MIT license**\n\nCopyright ©2012 Pierre Matri <pierre.matri@coolony.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"kiwi@0.2.2","dist":{"shasum":"809b33aad6171056fec8c988d31c58d719e3a1aa","tarball":"https://registry.npmjs.org/kiwi/-/kiwi-0.2.2.tgz","integrity":"sha512-37rAyYeV1f+Rynk1VQ24WxRBsanvQC0UnGasUjA55JRP5CmOBEvcOpja9wOa+3PGyoBXq854u0xo0vjWXTFXSA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3SftP6DBUj6gafHM5ufdoz1UcQshsV8WUWBDvu6Xm7gIgStM5Y/NtGeMXXtudhFLc/qRZ13nIPrKdu8j5PQVNV2M="}]},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"coolony","email":"pierre.matri@coolony.com"},"maintainers":[{"name":"coolony","email":"pierre.matri@coolony.com"}]}},"readme":"# Kiwi\n\n## What is this?\n\nKiwi is a cool JavaScript template engine lovingly built from the ground up for Node.js with performance, extensibility, modularity and security in mind. It is compatible with most of [jQuery templates](http://api.jquery.com/category/plugins/templates/) syntax, and adds lots of features to it. This means Kiwi is:\n\n* **Fast**. Insanely fast.\n* **Completely asynchronous**. You have the absolute guarantee that not a single blocking call will be done after Kiwi has been initialized.\n* **Easily extensible**. Three short lines of code are enough to create a new tag.\n* **Incredibly powerful**, even for advanced features. Want dynamic template inheritance? Access individual block contents? Done!\n* **Easy to set up**. One line of code and you can get started on [Express](http://expressjs.com) 3.x. You can even directly use your existing jQuery or [jqTpl](https://github.com/kof/node-jqtpl) templates.\n* **Robust**. Kiwi is carefully tested before any change is pushed to the repository.\n* **Full-featured**. Lots of filters are available, and it can't be easier to add your own if you want.\n* **Secure**. All output is escaped by default.\n* **Clean**. Kiwi won't mess with your prototypes, and won't extend any of the built-in JavaScript objects\n\n## Syntax\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <title>${title}</title>\n  </head>\n  <body>\n    <p>\n      {{if name}}\n        Hello, ${name|capitalize}!\n      {{else}}\n        Hello, dear unknown!\n      {{/if}}\n    </p>\n  </body>\n</html>\n```\n\n## Installation\n\n### Latest release\n\n```bash\nnpm install kiwi\n```\n\n### Development version (may not be suited for production [yet])\n\n```bash\nnpm install https://github.com/coolony/kiwi/tarball/master\n```\n\n## Usage\n\n```javascript\nvar kiwi = require('kiwi');\n\nvar template = '<p>Hello, ${name}!</p>';\nnew kiwi.Template(template).render({name: \"Kiwi\"}, function onRendered(err, rendered) {\n  console.log('Rendered template is: ' + rendered);\n});\n```\n\n## Available filters\n\n* escape\n* capitalize\n* upper\n* lower\n* json\n* add\n* subtract\n* mul\n* div\n* cut\n* addslashes\n* stripslashes\n* first\n* last\n* length\n* reverse\n* join\n* urlencode\n* urldecode\n* replace\n* date\n* relativedate\n* timeago\n\n## Performance tips\n\n* **Use cache in production**\n* **Use strict mode**  \nYou can disable strict mode in order to make Kiwi comply with jQuery template / jqTpl behaviour. However, this will result in using a bunch of `try…catch` blocks in the compiled templates, which will definitely lower Kiwi's performance.   \nStrict mode is enabled by default.\n* **Avoid using `tmpl`**   \nIn order to avoid memory leaks when using heavily dynamic templates in `tmpl`, this tag uses `CappedCache` by default, isolated from the main cache. As a result, if your nested templates are heavily dynamic, a new complete compiler stack is likely to be started each time a `tmpl` tag is met.   \nYou may choose to use a standard cache instead, but be aware that this could easily lead to huge memory leaks if your nested templates are heavily dynamic.   \nIt is included for compatibility with jQuery templates / jqTpl, but you should probably not use it at all.\n* **Consider disabling `eachLoopCounters`**   \nKiwi adds counters to `each` loop, which allows you, for example, to access the current iteration count with `_eachLoop.counter`. If you don't need this functionality, disabling it will slightly increase Kiwi's performance when using `each` loops.\n\n\n## License\n\n**Kiwi is released under an MIT license**\n\nCopyright ©2012 Pierre Matri <pierre.matri@coolony.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","maintainers":[{"name":"coolony","email":"pierre.matri@coolony.com"}],"time":{"modified":"2022-06-19T08:54:08.797Z","created":"2012-05-19T14:23:10.826Z","0.1.0":"2012-05-19T14:23:12.794Z","0.1.2":"2012-05-22T21:00:47.511Z","0.1.3":"2012-07-03T13:50:34.103Z","0.2.0":"2012-08-02T15:14:32.611Z","0.2.1":"2012-08-10T11:00:40.176Z","0.2.2":"2013-03-21T13:51:12.954Z"},"author":{"name":"Pierre Matri","email":"pierre.matri@coolony.com"},"repository":{"type":"git","url":"git://github.com/coolony/kiwi"}}