mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Bump to v3.7.0.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
var baseMatches = require('./baseMatches'),
|
||||
baseMatchesProperty = require('./baseMatchesProperty'),
|
||||
baseProperty = require('./baseProperty'),
|
||||
bindCallback = require('./bindCallback'),
|
||||
identity = require('../utility/identity');
|
||||
identity = require('../utility/identity'),
|
||||
property = require('../utility/property');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.callback` which supports specifying the
|
||||
@@ -17,7 +17,7 @@ var baseMatches = require('./baseMatches'),
|
||||
function baseCallback(func, thisArg, argCount) {
|
||||
var type = typeof func;
|
||||
if (type == 'function') {
|
||||
return typeof thisArg == 'undefined'
|
||||
return thisArg === undefined
|
||||
? func
|
||||
: bindCallback(func, thisArg, argCount);
|
||||
}
|
||||
@@ -27,9 +27,9 @@ function baseCallback(func, thisArg, argCount) {
|
||||
if (type == 'object') {
|
||||
return baseMatches(func);
|
||||
}
|
||||
return typeof thisArg == 'undefined'
|
||||
? baseProperty(func + '')
|
||||
: baseMatchesProperty(func + '', thisArg);
|
||||
return thisArg === undefined
|
||||
? property(func)
|
||||
: baseMatchesProperty(func, thisArg);
|
||||
}
|
||||
|
||||
module.exports = baseCallback;
|
||||
|
||||
Reference in New Issue
Block a user