Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "utils"

Index

Interfaces

Functions

Object literals

Functions

XMLEscape

  • XMLEscape(str: any): string
  • XML-escapes an input value after converting it to a string

    Parameters

    • str: any

      Input value (usually a string)

    Returns string

    XML-escaped string

copyProps

  • copyProps<T>(toObj: T, fromObj: T): T
  • Type parameters

    • T

    Parameters

    • toObj: T
    • fromObj: T

    Returns T

hasOwnProp

  • hasOwnProp(obj: object, prop: string): boolean
  • Parameters

    • obj: object
    • prop: string

    Returns boolean

replaceChar

  • replaceChar(s: string): string
  • Parameters

    • s: string

    Returns string

trimWS

  • trimWS(str: string, config: EtaConfig, wsLeft: string | false, wsRight?: string | false): string
  • Takes a string within a template and trims it, based on the preceding tag's whitespace control and config.autoTrim

    Parameters

    • str: string
    • config: EtaConfig
    • wsLeft: string | false
    • Optional wsRight: string | false

    Returns string

Object literals

escMap

escMap: object

A map of special HTML characters to their XML-escaped equivalents

"

": "&quot;" = "&quot;"

&

&: "&amp;" = "&amp;"

'

': "&#39;" = "&#39;"

<

<: "&lt;" = "&lt;"

>

>: "&gt;" = "&gt;"

Generated using TypeDoc