主题
over
js
_.over([iteratees=[_.identity]])
创建一个函数,使用其接收的参数调用 iteratees
并返回其结果。
¥Creates a function that invokes iteratees
with the arguments it receives and returns their results.
新增于
¥Since
4.0.0
参数
¥Arguments
[iteratees=[_.identity]]
(...(函数|函数[])):键值对。¥
[iteratees=[_.identity]]
(...(Function|Function[])): The iteratees to invoke.
返回
¥Returns
(函数):返回新函数。
¥(Function): Returns the new function.
示例
¥Example
js
var func = _.over([Math.max, Math.min]);
func(1, 2, 3, 4);
// => [4, 1]