Closed Bug 537548 Opened 15 years ago Closed 15 years ago

Add Array.isArray

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 510537

People

(Reporter: kangax, Unassigned)

Details

Array.isArray is specified in (now-finalized) ES5 (see 15.4.3.2) and is present in nightly WebKit, Opera 10.5 pre-alpha and latest builds of Chrome 4. All of these native implementations are significantly faster than custom one, such as, for example: Array.isArray = function isArray(o) { Object.prototype.toString.call(o) === '[object Array]'; }; WebKit is up to 17 times faster, Opera — up to 5 times, etc. Implementing Array.isArray in Mozilla could be beneficial for scripts and libraries that use helper similar to the above (Prototype.js and jQuery definitely have it, other libraries probably have it too). Thank you.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.