mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -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) {
|
isArray = Array.isArray = Array.isArray || function(obj) {
|
||||||
return toString.call(obj) === '[object Array]';
|
return toString.call(obj) === '[object Array]';
|
||||||
},
|
},
|
||||||
|
isObject = function(obj) {
|
||||||
|
return toString.call(obj) === '[object Object]';
|
||||||
|
},
|
||||||
slice = proto.slice,
|
slice = proto.slice,
|
||||||
forEach = proto.forEach || function(iter, bind) {
|
forEach = proto.forEach || function(iter, bind) {
|
||||||
for (var i = 0, l = this.length; i < l; i++)
|
for (var i = 0, l = this.length; i < l; i++)
|
||||||
|
@ -330,6 +333,7 @@ var Base = new function() { // Bootstrap scope
|
||||||
define: define,
|
define: define,
|
||||||
describe: describe,
|
describe: describe,
|
||||||
iterator: iterator,
|
iterator: iterator,
|
||||||
|
isObject: isObject,
|
||||||
|
|
||||||
check: function(obj) {
|
check: function(obj) {
|
||||||
return !!(obj || obj === 0);
|
return !!(obj || obj === 0);
|
||||||
|
|
Loading…
Reference in a new issue