API Docs for: 0.6.1
Show:

Helpers.common Class

Access point: ac.helpers.* Addon that provides helpers functionalities

Item Index

Methods

Methods

expose

(
  • helperName
  • helper
)

Expose a helper function as global. On the server side this means any mojit instance under a particular request can use the helper. On the client, any mojit instance on the page can use the helper.

Parameters:

  • helperName String

    The helper name.

  • helper Function

    Optional helper function, if not present, the helper will be lookup by name.

get

(
  • helperName
)
Function | Object

Gets one specific helper if the name is specified, otherwise returns all available helpers.

Parameters:

  • helperName String

    The optional helper name

Returns:

Function | Object: a helper function or all available helpers

set

(
  • helperName
  • helper
)

set a helper function at the mojit instance.

Parameters:

  • helperName String

    The helper name.

  • helper Function

    The helper function.