Skip to main content

Function: looseBooleanParser()

looseBooleanParser(input): boolean

Parses input strings as booleans (loosely). Transforms to lowercase and then checks against the following values:

  • true: "true", "t", "yes", "y", "on", "1"
  • false: "false", "f", "no", "n", "off", "0"

Parameters

input: string

Returns

boolean

Defined in

packages/core/src/parameter/parser/boolean.ts:27