# {%= name %} {%= badge("fury") %} > {%= description %} {%= include("install-npm", {save: true}) %} ## Example usage With Lo-Dash or Underscore: ```js <%= {%= nickname %}("index.js") %> ``` With Handlebars: ```handlebars {{{%= nickname %} "index.js"}} ``` With Verb (lo-dash, with special delimiters to avoid delimiter collision in markdown docs): ```js {%= "{%%= " + nickname + "('index.js') %}" %} ``` ## Run tests ```bash npm test ``` See [the tests](./test.js) for actual usage examples. ## Register the helper > This should work with any engine, here are a few examples ### [template] Register the helper for use with any template engine ```js template.helper('{%= nickname %}', require('{%= name %}')); ``` ### [assemble] To register the helper for use with [assemble] v0.6.x: ```js assemble.helper('{%= nickname %}', require('{%= name %}')); ``` ### [verb] Register the helper for use with [verb]: ```js var verb = require('verb'); verb.helper('{%= nickname %}', require('{%= name %}')); verb.task('default', function() { verb.src('.verb*.md') .pipe(verb.dest('./')); }); ``` ### [handlebars] ```js var handlebars = require('handlebars'); handlebars.registerHelper('{%= nickname %}', require('{%= name %}')); ``` ### [Lo-Dash] or [underscore] ```js // as a mixin _.mixin({{%= nickname %}: {%= nickname %}Helper}); _.template('<%= _.{%= nickname %}("fixtures/*.js") %>', {}); // passed on the context _.template('<%= {%= nickname %}("fixtures/*.js") %>', {{%= nickname %}: {%= nickname %}Helper}); // as an import var settings = {imports: {{%= nickname %}: {%= nickname %}Helper}}; _.template('<%= {%= nickname %}("fixtures/*.js") %>', {}, settings); ``` ## Contributing Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue]({%= bugs.url %}). To request or contribute a helper to the [github.com/helpers][helpers] org, please read [this contributing guide][guide] to get started. ## Author {%= include("author") %} ## License {%= copyright() %} {%= license() %} *** {%= include("footer") %} [assemble]: https://github.com/assemble/assemble [generator-verb]: https://github.com/assemble/generator-verb [handlebars-helpers]: https://github.com/assemble/handlebars-helpers/ [handlebars]: https://github.com/wycats/handlebars.js/ [helpers]: https://github.com/helpers [Lo-Dash]: https://lodash.com/ [template]: https://github.com/jonschlinkert/template [underscore]: https://github.com/jashkenas/underscore [verb]: https://github.com/assemble/verb [guide]: https://github.com/helpers/requests