juxt source npm

_.juxt(iteratees)

Creates a function that invokes iteratees with the arguments provided to the created function and returns their results.

Arguments

  1. iteratees (...(Function|Function[])

    The iteratees to invoke.

Returns (Function)

Returns the new function.

Example

var juxted = _.juxt(Math.max, Math.min);

juxted(1, 2, 3, 4);
// => [4, 1]