Function compose

  • Takes a series of functions and returns a new function that runs these functions in reverse sequence. If a function returns a Promise, the next function is called with the resolved value.

    Parameters

    • Rest ...fns: Fn[]

      The functions to compose.

    Returns ((...args) => any)

    A new function that takes any number of arguments and composes them through fns.

      • (...args): any
      • Parameters

        • Rest ...args: any[]

        Returns any