Helper

Helper

Helper is used to defined shared snippet.

Constructor

new Helper(name, func)

Create a Helper
Source:
Parameters:
Name Type Description
name string helper name
func function a function defines the behaviors of the helper

Members

(static) helpers

Store all helpers grouped by name.
Source:

Methods

(static) clear()

Clear all registered helpers.
Source:

(static) fetch(name) → {Helper}

Fetch a helper by name.
Source:
Parameters:
Name Type Description
name string helper name.
Returns:
Type:
Helper
the matching helper.

(static) register(name, helper)

Register a helper with its name.
Source:
Parameters:
Name Type Description
name string the unique helper name.
helper Helper the helper to register.