utilizes.scenarios

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

Usage no npm install needed!

<script type="module">
  import utilizesScenarios from 'https://cdn.skypack.dev/utilizes.scenarios';
</script>

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.