| Current Path : /home/balossw/www/temp/common/modules/javascript/js/ |
| Current File : /home/balossw/www/temp/common/modules/javascript/js/utils.array.js |
/*---------------------------------------------------------------------------
File name ............ common/js/utils.array.js
Author ............... Antoine Lemoine
Creation date ........ 02.09.2009
Modification date .... 02.09.2009
---------------------------------------------------------------------------*/
function in_array(needle, haystack, strict)
{
var found = false;
var key;
strict = !!strict;
for (key in haystack)
{
if ((strict && haystack[key] === needle) || (!strict && haystack[key] == needle))
{
found = true;
break;
}
}
return found;
}
function is_array(mixed_var) {
return (mixed_var instanceof Object);
}