From 32eb10b43bbd2352a4337ec27fbf7034d8783c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 14 Nov 2012 01:31:16 -0800 Subject: [PATCH] Define Base.isObject(). --- lib/bootstrap.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/bootstrap.js b/lib/bootstrap.js index 94cd508a..1a08c7c0 100644 --- a/lib/bootstrap.js +++ b/lib/bootstrap.js @@ -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);