Module handlebars.filter

Provides helpers and methods to filter content

var Handlebars = require("handlebars");
var Filter = require("handlebars.filter");
Filter.registerHelper(Handlebars);
Returns

Filter instance

Type
object
Source:

Methods

(static) locale(locopt) → {string}

Get or set default locale used by Filter

If called without loc parameter, returns locale

If called with loc parameter, sets locale

Parameters
Name Type Attributes Description
loc string <optional>

Locale to switch to

Source:
Returns

Filter’s locale

Type
string

(static) registerFilter(name, fn)

Add filter to Filter

Parameters
Name Type Description
name string

Name of filter

fn function

Filter function

Source:

(static) registerHelper(hbars)

Register Filter helper with Handlebars

Parameters
Name Type Description
hbars object

[description]

Source:

(static) unregisterFilter(name)

Remove filter from Filter

Parameters
Name Type Description
name string

Name of filter

Source: