Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

is_array

oatkiller edited this page Sep 13, 2010 · 1 revision

is_array returns true if its argument is an array, false otherwise.

(function () {

o.is_array([]); // true
o.is_array({}); // false

// false
o.is_array({
	'0': 'a',
	'1': 'b',
	length: 2
});

})();

note:
this is only effective on arrays created in a window that has is_array included. in otherwords, if an array is created in an iframe that doenst include is_array, that array wont be detected properly by is_array

Clone this wiki locally