Global

Methods

parseBoolean(value) → {boolean}

Parse a string as a boolean
Falsey values are

  • 0 or "0"
  • false or "false" (case insensitive)
  • null or undefined
    NOTE: An empty string is true, this is so an empty HTML attribute is true, like normal HTML boolean attributes (eg. disabled and hidden)
Parameters:
Name Type Description
value *
Source:
Returns:
Type
boolean

parseDuration(duration)

Parses a duration string and returns the time in milliseconds
Durations are in the form: ${duration: number}${unit: string}
EG.
5ms => 5 milliseconds
30s => 30 seconds
5m => 5 minutes
2h => 2 hours

Parameters:
Name Type Description
duration string

A string duration

Source:

permutations(arr)

Returns the permutations of an array for all combinations and lengths

Parameters:
Name Type Description
arr *
Source:

(async) registerControllers(…controllers)

Register a controller (or multiple controllers)

Example

registerControllers(MyController, MyOtherController, MyOtherController.withTag("some-custom-tag"));
Parameters:
Name Type Attributes Description
controllers any <repeatable>
Source: