Permalink
Fetching contributors…
Cannot retrieve contributors at this time
64 lines (41 sloc) 1.25 KB

Browser usage

See how to use handlebars-helpers in the browser.

Usage

The main export returns a function that needs to be called to expose the object of helpers.

var helpers = require('{%= name %}')();
//=> returns object with all (130+) helpers

Get a specific collection

Helper collections are exposed as getters, so only the helpers you want will be required and loaded.

var helpers = require('{%= name %}');
var math = helpers.math();
//=> only the `math` helpers

var helpers = require('{%= name %}');
var array = helpers.array();
//=> only the `collections` helpers

Optionally pass your own handlebars

var handlebars = require('handlebars');
var helpers = require('{%= name %}')({
  handlebars: handlebars
});

// or for a specific collection
var math = helpers.math({
  handlebars: handlebars
});

Helpers

{%= include("docs/toc.md") %}


{%= include("docs/sections.md") %}


Utils

The following utils are exposed on .utils.

{%= apidocs('lib/utils/index.js') %}


History

{%= changelog(yaml(read("CHANGELOG"))) %}