Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "lib/meshTemplateFilters"

Index

Variables

MOMENT_FILTER_KEY

MOMENT_FILTER_KEY: string

TRANSLATE_FILTER_KEY

TRANSLATE_FILTER_KEY: string

YOUTUBE_FILTER_KEY

YOUTUBE_FILTER_KEY: string

Functions

momentFilter

  • momentFilter(input: any, format: string): string
  • Simple moment filter, that can be used to render mesh dates/timestamps with a formatstring.

    Parameters

    • input: any

      unix timestamp that should be rendered

    • format: string

      format string (check momentjs website)

    Returns string

    formated date.

registerFilters

  • Register default template filters. Out of the box we support registering filters with swig and handlebars. If you have a different template engine please pass a register function to register the filters with your template engine. This function will then be called for each of the mesh filters.

    Parameters

    • engine: any

      Your template engine.

    • Optional registerfunction: IFilterRegisterFunction

      register function that will be called for each of the mesh filters.

    Returns void

youtubeFilter

  • youtubeFilter(input: string): string
  • Simple youtube filter, that extracts the video id out of a youtube link.

    Parameters

    • input: string

    Returns string

Generated using TypeDoc