mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
added _.isBoolean function
This commit is contained in:
@@ -525,6 +525,11 @@
|
||||
return (obj === +obj) || (toString.call(obj) === '[object Number]');
|
||||
};
|
||||
|
||||
// Is a given value a boolean?
|
||||
_.isBoolean = function(obj) {
|
||||
return (toString.call(obj) === '[object Boolean]');
|
||||
};
|
||||
|
||||
// Is a given value a date?
|
||||
_.isDate = function(obj) {
|
||||
return !!(obj && obj.getTimezoneOffset && obj.setUTCFullYear);
|
||||
|
||||
Reference in New Issue
Block a user