• executes a function when a value changes to true

    Parameters

    • val: boolean | Function

      {function | boolean} wait until val is true

    • fn: Function

      {function} function to execute when val turns true

    • interval: int = 100

      {int} checking interval in ms, default = 100

    Returns Promise<any>