merging mrjjwright's isBoolean, with tests, docs, and credit

This commit is contained in:
Jeremy Ashkenas
2010-02-27 00:03:36 -05:00
parent bd271e4794
commit 9903905175
4 changed files with 16 additions and 3 deletions

View File

@@ -527,7 +527,7 @@
// Is a given value a boolean?
_.isBoolean = function(obj) {
return (toString.call(obj) === '[object Boolean]');
return obj === true || obj === false;
};
// Is a given value a date?