Define Base.isObject().

This commit is contained in:
Jürg Lehni 2012-11-14 01:31:16 -08:00
parent d671a08205
commit 32eb10b43b

4
lib/bootstrap.js vendored
View file

@ -19,6 +19,9 @@ var Base = new function() { // Bootstrap scope
isArray = Array.isArray = Array.isArray || function(obj) {
return toString.call(obj) === '[object Array]';
},
isObject = function(obj) {
return toString.call(obj) === '[object Object]';
},
slice = proto.slice,
forEach = proto.forEach || function(iter, bind) {
for (var i = 0, l = this.length; i < l; i++)
@ -330,6 +333,7 @@ var Base = new function() { // Bootstrap scope
define: define,
describe: describe,
iterator: iterator,
isObject: isObject,
check: function(obj) {
return !!(obj || obj === 0);