Skip to content

Latest commit

 

History

History
75 lines (48 loc) · 1.52 KB

.verb.md

File metadata and controls

75 lines (48 loc) · 1.52 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.

Get all helpers

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

Get a specific helper 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

Get multiple helpers collections

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

var helpers = require('{%= name %}')(['math', 'string']);
//=> only the `math` and `string` 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"))) %}