mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Cleanup _.isObject and _.isRegExp.
This commit is contained in:
@@ -6372,7 +6372,7 @@
|
|||||||
// and avoid a V8 bug
|
// and avoid a V8 bug
|
||||||
// https://code.google.com/p/v8/issues/detail?id=2291
|
// https://code.google.com/p/v8/issues/detail?id=2291
|
||||||
var type = typeof value;
|
var type = typeof value;
|
||||||
return (value && (type == 'function' || type == 'object')) || false;
|
return (type == 'function' || (value && type == 'object')) || false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -6515,9 +6515,7 @@
|
|||||||
* // => false
|
* // => false
|
||||||
*/
|
*/
|
||||||
function isRegExp(value) {
|
function isRegExp(value) {
|
||||||
var type = typeof value;
|
return (isObject(value) && toString.call(value) == regexpClass) || false;
|
||||||
return (value && (type == 'function' || type == 'object') &&
|
|
||||||
toString.call(value) == regexpClass) || false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user