Home larynx

Collection of helpers for Handlebars

Version

1.0.1

Installation

npm install larynx

Registering the helpers

var Handlebars = require("handlebars");
var Larynx = require("larynx");
Larynx.registerHelpers(Handlebars);

Setting locales and languages

Larynx.locale(loc);
Larynx.setLanguages(langs);

Helpers provided

Convenience methods

locale

Set Larynx’s locale

Larynx.locale(loc);

See larynx.locale

registerFilter

Add a content filter

Larynx.registerFilter(name, fn);

See larynx.registerFilter

setLanguages

Larynx.setLanguages(langs, options);

See larynx.setLanguages

addLanguages

Larynx.addLanguages(langs);

See larynx.addLanguages

setLanguage

Larynx.setLanguage(lang, phrases);

See larynx.setLanguage

addLanguage

Larynx.addLanguage(lang, phrases);

See larynx.addLanguage

Tests

npm test

To see output generated by tests

npm run test:output