{"name":"template-bind-helpers","description":"Bind the current instance of a Templates-based application to an object of helpers, allowing them to be passed to a different render method.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/template-bind-helpers","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/template-bind-helpers.git"},"bugs":{"url":"https://github.com/jonschlinkert/template-bind-helpers/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"isobject":"^2.0.0"},"devDependencies":{"engine-base":"^0.1.2","lodash":"^3.10.1","mocha":"*","should":"*","template-helpers":"^0.3.4","templates":"^0.6.3"},"keywords":["assemble","engines","generate","helper","helpers","template","templates","verb"],"verb":{"plugins":["gulp-format-md"],"related":{"list":["helper-cache","engine-cache","async-helpers","template-helpers"]},"reflinks":["template","assemble","verb","generate"]},"gitHead":"6b86e793e71773ecc06bf8bf7480013fc8870f07","_id":"template-bind-helpers@0.2.0","_shasum":"be5e5f8053ddf5a031c46df48ab02a76b9380ba3","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"be5e5f8053ddf5a031c46df48ab02a76b9380ba3","tarball":"http://registry-npm.ywwl.com/template-bind-helpers/download/template-bind-helpers-0.2.0.tgz","integrity":"sha512-Up+xwhphdRhTrFUISIEobgFF0yFKVRjSez/kOw3Vf6rgUQkTAA5LgZs9jZKXhqjhLbHziQ8LSMaUzROIreGSog==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICNRqFUBcNonpOU3FpUQbjFpisg5Rqr4AXSWmc9X3tVtAiEAisCTADlPh5uKEVfgNtHC/XtkAK+90+Lv2UwZbZQEU0s="}],"size":2729,"noattachment":false,"key":"/template-bind-helpers/-/template-bind-helpers-0.2.0.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":1449853208929,"_cnpm_publish_time":1449853208929,"dist-tags":{"latest":"0.2.0"}}