mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Define Base.isObject().
This commit is contained in:
parent
d671a08205
commit
32eb10b43b
1 changed files with 4 additions and 0 deletions
4
lib/bootstrap.js
vendored
4
lib/bootstrap.js
vendored
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue