fiddle.js
fiddle.js copied to clipboard
Use Array#isArray instead of instanceof
And if you plan to support browser, use this instead
/**
* Checks for Array type.
*
* @param {Object} object
* @api private
*/
function isArray (obj) {
return '[object Array]' == Object.prototype.toString.call(obj);
};
This also applies to dref.js
I think generally it'd be good practice for me to start using Array.isArray versus value instanceof Array for this very reason. Made note of it. Thanks for pointing it out.