{"name":"template-bind-helpers","description":"Utility for applications based on Template for exposing the current instance of the application as `this` in helpers.","version":"0.1.2","homepage":"https://github.com/jonschlinkert/template-bind-helpers","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/template-bind-helpers.git"},"bugs":{"url":"https://github.com/jonschlinkert/template-bind-helpers/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/template-bind-helpers/blob/master/LICENSE"},"files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"engine-lodash":"^0.6.2","lodash":"^3.7.0","mocha":"*","should":"*","template":"^0.12.6","template-helpers":"^0.3.2"},"keywords":["assemble","engines","generate","helper","helpers","template","templates","verb"],"gitHead":"be8d6579e3f722cb77c60cbab054cca102993c7f","_id":"template-bind-helpers@0.1.2","_shasum":"dcb7376db2681c43dd74bc3a73f522400e1b727e","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"dcb7376db2681c43dd74bc3a73f522400e1b727e","tarball":"http://registry-npm.ywwl.com/template-bind-helpers/download/template-bind-helpers-0.1.2.tgz","integrity":"sha512-ETolnMD7mOTBu4D+ev1rWlufFdXXEzVSUpWuRbZaFHw6k8sf40C1bsGoL0QsnFkF3dfZOqsoEkjzObtQRqAVKw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFWNG/rVLFPhuU1GBbL5yTQe1j+cNV/l1Na1l4C+P+OTAiBjkA3sx2YoKP2R+yCbk7OWKV8ME/2R3qq6fIXBW75/gg=="}],"size":2565,"noattachment":false,"key":"/template-bind-helpers/-/template-bind-helpers-0.1.2.tgz"},"directories":{},"readme":"# template-bind-helpers [![NPM version](https://img.shields.io/npm/v/template-bind-helpers.svg)](https://www.npmjs.com/package/template-bind-helpers) [![Build Status](https://img.shields.io/travis/jonschlinkert/template-bind-helpers.svg)](https://travis-ci.org/jonschlinkert/template-bind-helpers)\n\n> Bind the current instance of a Templates-based application to an object of helpers, allowing them to be passed to a different render method.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/)\n\n```sh\n$ npm i template-bind-helpers --save\n```\n\n## Usage\n\n### bindHelpers\n\nBind helper functions to `app` so that, when the helper is called, the `this` keyword is set to the provided instance of `app`.\n\n**Params**\n\n* `app` **{Object}**: Instance of any [Templates-based][templates] application, such as [verb](https://github.com/verbose/verb), [assemble](http://assemble.io) or [generate](https://github.com/jonschlinkert/generate)\n* `view` **{Object}**: The view being compiled or rendered\n* `locals` **{Object}**: Context object with helpers to bind. This is usually the `options` object.\n* `isAsync` **{Boolean}**\n* `returns` **{Object}**\n\n**Example**\n\n```js\nvar bindHelpers = require('{%= name %}');\nvar str = '<%= replace(\"foo\", \"bar\") %>';\nopts = bindHelpers(this.app, opts, true);\n\n// pass opts to a render method as context\napp.render(str, opts, function(err, result) {\n  console.log(result);\n});\n```\n\n## Related projects\n\n* [async-helpers](https://www.npmjs.com/package/async-helpers): Use async helpers in templates with engines that typically only handle sync helpers. Handlebars and… [more](https://www.npmjs.com/package/async-helpers) | [homepage](https://github.com/doowb/async-helpers)\n* [engine-cache](https://www.npmjs.com/package/engine-cache): express.js inspired template-engine manager. | [homepage](https://github.com/jonschlinkert/engine-cache)\n* [helper-cache](https://www.npmjs.com/package/helper-cache): Easily register and get helper functions to be passed to any template engine or node.js… [more](https://www.npmjs.com/package/helper-cache) | [homepage](https://github.com/jonschlinkert/helper-cache)\n* [template-helpers](https://www.npmjs.com/package/template-helpers): Generic JavaScript helpers that can be used with any template engine. Handlebars, Lo-Dash, Underscore, or… [more](https://www.npmjs.com/package/template-helpers) | [homepage](https://github.com/jonschlinkert/template-helpers)\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm i -d && npm test\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/template-bind-helpers/issues/new).\n\n## Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert)\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb) on December 11, 2015._","publish_time":1429423942729,"_cnpm_publish_time":1429423942729,"dist-tags":{"latest":"0.2.0"}}