Function promiseMap

  • Creates promises of a list of values. Resolves all promises and returns an array of resolved values.

    Parameters

    • values: any[]
    • onValue: ((value) => Promise<unknown>)
        • (value): Promise<unknown>
        • Parameters

          • value: unknown

          Returns Promise<unknown>

    • onError: ((error?, value?, index?) => void) = noop
        • (error?, value?, index?): void
        • Parameters

          • Optional error: unknown
          • Optional value: unknown
          • Optional index: number

          Returns void

    Returns Promise<any>