invoke a delegated method with arguments as an array. enforces specific arity
(number)
0 - 10
(string)
a function name on your delegatee
(Array)
arguments to pass to your delegatee's method
(any)
something with methods
any
:
the result of delegating to the method with some arguments
import {eN} from 'entrust'
eN(0, `toUpperCase`, [], `cool`) // `COOL`
eN(1, `map`, [(x) => x * 2], [1,2,3]) // [2,4,6]
eN(2, `reduce`, [(a, b) => (a + b), 0], [1,2,3]) // 6
invoke a delegated method with arguments as an array. enforces specific arity Yells at you if you give arguments that don't match the expected arity.
(number)
0 - 10
(string)
a function name on your delegatee
(Array)
arguments to pass to your delegatee's method
(any)
something with methods
any
:
the result of delegating to the method with some arguments
import {eD} from 'entrust'
eD(0, `toUpperCase`, [], `cool`) // `COOL`
eD(1, `map`, [(x) => x * 2], [1,2,3]) // [2,4,6]
eD(2, `reduce`, [(a, b) => (a + b), 0], [1,2,3]) // 6
eD(2, `reduce`, [(a, b) => (a + b)], [1, 2, 3]) // throws error