1.0.2 • Published 3 years ago

utilizes.scenarios v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

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.