Function parseBooleanToken

  • Convert a value that represents a valid boolean token into a boolean value, where a valid boolean token can be any of:

    • true or "true"
    • false or "false"
    • 1 or "1"
    • 0 or "0"

    If the value passed does not represent any valid token, an Error will be thrown. Alternatively, to surpress the error and return false instead, pass the silent parameter with a value of true.

    Returns

    Returns the boolean value that the token represents

    Parameters

    • value: any
    • silent: boolean = false

    Returns boolean

Generated using TypeDoc