eN

invoke a delegated method with arguments as an array. enforces specific arity

eN(n: number, method: string, args: Array, delegatee: any): any
Parameters
n (number) 0 - 10
method (string) a function name on your delegatee
args (Array) arguments to pass to your delegatee's method
delegatee (any) something with methods
Returns
any: the result of delegating to the method with some arguments
Example
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

eD

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.

eD(n: number, method: string, args: Array, delegatee: any): any
Parameters
n (number) 0 - 10
method (string) a function name on your delegatee
args (Array) arguments to pass to your delegatee's method
delegatee (any) something with methods
Returns
any: the result of delegating to the method with some arguments
Example
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