mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Bump to v4.14.0.
This commit is contained in:
6
cond.js
6
cond.js
@@ -1,7 +1,7 @@
|
||||
import apply from './_apply.js';
|
||||
import arrayMap from './_arrayMap.js';
|
||||
import baseIteratee from './_baseIteratee.js';
|
||||
import rest from './rest.js';
|
||||
import baseRest from './_baseRest.js';
|
||||
|
||||
/** Used as the `TypeError` message for "Functions" methods. */
|
||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||
@@ -23,7 +23,7 @@ var FUNC_ERROR_TEXT = 'Expected a function';
|
||||
* var func = _.cond([
|
||||
* [_.matches({ 'a': 1 }), _.constant('matches A')],
|
||||
* [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
|
||||
* [_.constant(true), _.constant('no match')]
|
||||
* [_.stubTrue, _.constant('no match')]
|
||||
* ]);
|
||||
*
|
||||
* func({ 'a': 1, 'b': 2 });
|
||||
@@ -46,7 +46,7 @@ function cond(pairs) {
|
||||
return [toIteratee(pair[0]), pair[1]];
|
||||
});
|
||||
|
||||
return rest(function(args) {
|
||||
return baseRest(function(args) {
|
||||
var index = -1;
|
||||
while (++index < length) {
|
||||
var pair = pairs[index];
|
||||
|
||||
Reference in New Issue
Block a user