{"_id":"handlebars-group-by","_rev":"6-ebc03eca560e46ab19b66a297873e44e","name":"handlebars-group-by","description":"Handlebars helper which allows you to group lists by a property of each item.","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"handlebars-group-by","version":"1.0.0","description":"Handlebars helper which allows you to group lists by a property of each item.","keywords":["group","dust","express","handlebars","hbs","mote","mustache"],"homepage":"https://github.com/shannonmoeller/handlebars-group-by","bugs":{"url":"https://github.com/shannonmoeller/handlebars-group-by/issues"},"license":"MIT","author":{"name":"Shannon Moeller","email":"me@shannonmoeller.com","url":"http://shannonmoeller.com"},"main":"index.js","repository":{"type":"git","url":"https://github.com/shannonmoeller/handlebars-group-by.git"},"scripts":{"coveralls":"cat ./coverage/lcov.info | coveralls","test":"gulp test"},"devDependencies":{"browserify":"^6.1.0","coveralls":"^2.11.2","expect.js":"^0.3.1","express":"^4.9.8","gulp":"^3.8.9","gulp-istanbul":"^0.3.1","gulp-jscs":"^1.2.1","gulp-jshint":"^1.8.5","gulp-mocha":"^1.1.1","gulp-prettify":"^0.3.0","handlebars":"~2.0","hbs":"^2.7.0","hbs-utils":"0.0.3","jshint-stylish":"^1.0.0","map-stream":"^0.1.0","vinyl-fs":"^0.3.10","vinyl-source-stream":"^1.0.0"},"engines":{"node":">= 0.10"},"gitHead":"c0963aeb0f60bdd82b30b505ed9c24e8e2a189a0","_id":"handlebars-group-by@1.0.0","_shasum":"800e1dcd45c562ee197e9d41bf4eb91b10546705","_from":".","_npmVersion":"2.1.8","_nodeVersion":"0.10.33","_npmUser":{"name":"shannonmoeller","email":"me@shannonmoeller.com"},"maintainers":[{"name":"shannonmoeller","email":"me@shannonmoeller.com"}],"dist":{"shasum":"800e1dcd45c562ee197e9d41bf4eb91b10546705","tarball":"https://registry.npmjs.org/handlebars-group-by/-/handlebars-group-by-1.0.0.tgz","integrity":"sha512-RioHVlGjSPLoujgbDEBIXRa2QsbaVlKAMFAGyc3i2xEv8BcKK/CefRRN7AfgDXV4k8vUy7gN6hf+5EHD4aGD3Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFmf2pxlPaUx0rhgWCGc+0PlUX0XUnvcpXnwP8g3Vfv2AiEA2R+8x6p2ZMxfeoRtZD7Bxr4svlNXEPNNJoPXpDejrvA="}]}},"1.0.1":{"name":"handlebars-group-by","version":"1.0.1","description":"Handlebars helper which allows you to group lists by a property of each item.","keywords":["group","dust","express","handlebars","hbs","mote","mustache"],"homepage":"https://github.com/shannonmoeller/handlebars-group-by","bugs":{"url":"https://github.com/shannonmoeller/handlebars-group-by/issues"},"license":"MIT","author":{"name":"Shannon Moeller","email":"me@shannonmoeller.com","url":"http://shannonmoeller.com"},"main":"index.js","repository":{"type":"git","url":"https://github.com/shannonmoeller/handlebars-group-by.git"},"scripts":{"coveralls":"cat ./coverage/lcov.info | coveralls","test":"gulp test"},"devDependencies":{"browserify":"^6.1.0","coveralls":"^2.11.2","expect.js":"^0.3.1","express":"^4.9.8","gulp":"^3.8.9","gulp-istanbul":"^0.3.1","gulp-jscs":"^1.2.1","gulp-jshint":"^1.8.5","gulp-mocha":"^1.1.1","gulp-prettify":"^0.3.0","handlebars":"~2.0","hbs":"^2.7.0","hbs-utils":"0.0.3","jshint-stylish":"^1.0.0","map-stream":"^0.1.0","vinyl-fs":"^0.3.10","vinyl-source-stream":"^1.0.0"},"engines":{"node":">= 0.10"},"gitHead":"1f304811610f5af3c300d31056357179d917104c","_id":"handlebars-group-by@1.0.1","_shasum":"035eeff35e7d87976b3596af37e44838249ab2ef","_from":".","_npmVersion":"2.1.8","_nodeVersion":"0.10.33","_npmUser":{"name":"shannonmoeller","email":"me@shannonmoeller.com"},"maintainers":[{"name":"shannonmoeller","email":"me@shannonmoeller.com"}],"dist":{"shasum":"035eeff35e7d87976b3596af37e44838249ab2ef","tarball":"https://registry.npmjs.org/handlebars-group-by/-/handlebars-group-by-1.0.1.tgz","integrity":"sha512-qwVVDVAJMBKdmnQU8jcEXGOu+4/2YJX1RP3pUw6Ee9t6gdkxt+dJEWDudSFTgqb35KXrktw/Nn/Dp3Rx5muHpg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkIA8EMAJrDh9QZX/ZDUIh8Z7+F41ggwO2IsqIY1DI8QIgMvGUVssreNTgjTC5W4SkZQ2mh7C83dkwk5tBAfxO7C0="}]}}},"readme":"# `handlebars-group-by`\n\n> Handlebars helper which allows you to group lists by a property of each item.\n\n[![NPM version][npm-img]][npm-url] [![Downloads][downloads-img]][npm-url] [![Build Status][travis-img]][travis-url] [![Coverage Status][coveralls-img]][coveralls-url]\n\n## Install\n\nWith [Node.js](http://nodejs.org):\n\n    $ npm install handlebars-group-by\n\nWith [Bower](http://bower.io):\n\n    $ bower install shannonmoeller/handlebars-group-by\n\n## Helper\n\n### `{{#group [list] by=[property]}}`\n\n- `list` `Array` - Array whose items should be grouped together.\n- `by` `String` - The name of the property by whose value items should be grouped.\n\nData:\n\n```js\n{\n    posts: [\n        { year: 2014, title: 'foo', body: 'foo bar' },\n        { year: 2014, title: 'bar', body: 'bar baz' },\n        { year: 2014, title: 'baz', body: 'baz bat' },\n        { year: 2015, title: 'bat', body: 'bat qux' },\n        { year: 2015, title: 'qux', body: 'qux foo' }\n    ]\n}\n```\n\nTemplate:\n\n```html\n{{#group posts by=\"year\"}}\n\t<h1>{{ value }}</h1>\n\n\t{{#each items}}\n\t\t<h2>{{ title }}</h2>\n\t\t<p>{{ body }}</p>\n\n\t{{/each}}\n{{/group}}\n```\n\nOutput:\n\n```html\n<h1>2014</h1>\n\n<h2>foo</h2>\n<p>foo bar</p>\n\n<h2>bar</h2>\n<p>bar baz</p>\n\n<h2>baz</h2>\n<p>baz bat</p>\n\n<h1>2015</h1>\n\n<h2>bat</h2>\n<p>bat qux</p>\n\n<h2>qux</h2>\n<p>qux foo</p>\n```\n\n## Api\n\nHelpers are registered by passing in your instance of Handlebars. This allows\nyou to selectively register the helpers on various instances of Handlebars.\n\n### `groupBy(handlebars)`\n\n- `handlebars` `Handlebars` - An instance of Handlebars.\n\n```js\nvar handlebars = require('handlebars'),\n    groupBy = require('handlebars-group-by');\n\ngroupBy(handlebars);\n```\n\n### `groupBy.register(handlebars)`\n\n- `handlebars` `Handlebars` - An instance of Handlebars.\n\nHelpers are also exposed via a `register` method for use with [Assemble](http://assemble.io/).\n\n```js\nvar handlebars = require('handlebars'),\n    groupBy = require('handlebars-group-by');\n\ngroupBy.register(handlebars);\n\n// or\n\ngrunt.initConfig({\n    assemble: {\n        options: {\n            helpers: ['path/to/handlebars-group-by.js']\n        }\n    }\n});\n```\n\n## Contribute\n\n[![Tasks][waffle-img]][waffle-url] [![Chat][gitter-img]][gitter-url] [![Tip][gittip-img]][gittip-url]\n\nStandards for this project, including tests, code coverage, and semantics are enforced with a build tool. Pull requests must include passing tests with 100% code coverage and no linting errors.\n\n### Test\n\n```sh\n$ gulp test\n```\n\n## License\n\nMIT\n\n[coveralls-img]: http://img.shields.io/coveralls/shannonmoeller/handlebars-group-by/master.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/shannonmoeller/handlebars-group-by\n[downloads-img]: http://img.shields.io/npm/dm/handlebars-group-by.svg?style=flat-square\n[gitter-img]:    http://img.shields.io/badge/chat-shannonmoeller/handlebars--group-by-blue.svg?style=flat-square\n[gitter-url]:    https://gitter.im/shannonmoeller/handlebars-group-by\n[gittip-img]:    http://img.shields.io/gittip/shannonmoeller.svg?style=flat-square\n[gittip-url]:    https://www.gittip.com/shannonmoeller\n[npm-img]:       http://img.shields.io/npm/v/handlebars-group-by.svg?style=flat-square\n[npm-url]:       https://npmjs.org/package/handlebars-group-by\n[travis-img]:    http://img.shields.io/travis/shannonmoeller/handlebars-group-by.svg?style=flat-square\n[travis-url]:    https://travis-ci.org/shannonmoeller/handlebars-group-by\n[waffle-img]:    http://img.shields.io/github/issues/shannonmoeller/handlebars-group-by.svg?style=flat-square\n[waffle-url]:    http://waffle.io/shannonmoeller/handlebars-group-by\n","maintainers":[{"name":"shannonmoeller","email":"me@shannonmoeller.com"}],"time":{"modified":"2022-06-18T18:52:18.471Z","created":"2014-12-15T17:43:17.541Z","1.0.0":"2014-12-15T17:43:17.541Z","1.0.1":"2014-12-15T19:25:30.710Z"},"homepage":"https://github.com/shannonmoeller/handlebars-group-by","keywords":["group","dust","express","handlebars","hbs","mote","mustache"],"repository":{"type":"git","url":"https://github.com/shannonmoeller/handlebars-group-by.git"},"author":{"name":"Shannon Moeller","email":"me@shannonmoeller.com","url":"http://shannonmoeller.com"},"bugs":{"url":"https://github.com/shannonmoeller/handlebars-group-by/issues"},"license":"MIT","readmeFilename":"README.md"}