utilizes.scenarios
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

scenarios

Invoke function multiple times with other arguments, and get the results.

Usage: scenarios(func: (...args) => any, ...funcArgs: Array<typeof args>): Array<ReturnType<typeof func>>

import { scenarios } from 'utilizes.scenarios'

const add = (a, b) => a + b

scenarios(add, [1, 2], [3, 4])
// Output: [3, 7]

This module exported from utilizes project.

/utilizes.scenarios/

    Package Sidebar

    Install

    npm i utilizes.scenarios

    Weekly Downloads

    0

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    3.5 kB

    Total Files

    5

    Last publish

    Collaborators

    • natqe3