contains.js
// test whether any array element contains the item
test whether any array element contains the item
test whether any array element contains the item
function _arrayContains( arr, item, asStrict ) {
    if (isContainerObject(item)) {
        for (var i=0; i<arr.length; i++) {
            if (isContainerObject(arr[i]) && _objectContains(arr[i], item, asStrict)) return true;
        }
        return false;
    }
    else {
        for (var i=0; i<arr.length; i++) if (deepEqual(arr[i], item, asStrict)) return true;
        return false;
    }
}
function _arrayContains ( arr , item , asStrict ) { if ( isContainerObject ( item ) ) { for ( var i = 0 ; i < arr . length ; i ++ ) { if ( isContainerObject ( arr [ i ] ) && _objectContains ( arr [ i ] , item , asStrict ) ) return true ; } return false ; } else { for ( var i = 0 ; i < arr . length ; i ++ ) if ( deepEqual ( arr [ i ] , item , asStrict ) ) return true ; return false ; } }
test whether any array element contains the item
test whether any array element contains the item
// ?? if (asStrict) return arr.indexOf(item); // TODO: double-check semantics