holyfills
Version:
No more "Holy Sxxt!!" when writting ES5/ES6
13 lines (10 loc) • 457 B
JavaScript
;
var assignProperty = require("../helpers/assignProperty");
var object_to_string = require("../helpers/object_to_string");
module.exports = HAS_ARRAY_IS_ARRAY ? Array.isArray : function(obj) {
return object_to_string.call(obj) === "[object Array]";
};
// ES5 15.4.3.2
// http://es5.github.com/#x15.4.3.2
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
assignProperty(Array, "isArray", module.exports);