Lodash overEvery method
语法
_.overEvery([predicates=[_.identity]])
Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives.
参数
[predicates=[_.identity]] (...(Function|Function[])) − The predicates to check.
输出
(Function) − Returns the new function.
实例
var _ = require('lodash');
var func = _.overEvery([Boolean, isFinite]);
console.log(func('1'));
console.log(func(null));
console.log(func(NaN));
Save the above program in
tester.js. Run the following command to execute this program.
Command
输出