utilizes.scenarios
v1.0.2
Published
Invoke function multiple times with other arguments, and get the results.
Downloads
7
Readme
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.