function findAndDelete(target, value) {
    if (!isIterable(target))
        return false;
    if (isArray(target)) {
        for (let i = 0; i < target.length; i++) {
            if (deep_equal_1.default(target[i], value)) {
                target.splice(i, 1);
                return true;
            }
        }
    }
    else if (isObject(target)) {
        const keys = Object.keys(target);
        for (let i = 0; i < keys.length; i++) {
            if (deep_equal_1.default(target[keys[i]], value)) {
                delete target[keys[i]];
                return true;
            }
        }
    }
    return false;
}
function findAndDelete(target, value) {
    if (!isIterable(target))
        return false;
    if (isArray(target)) {
        for (let i = 0; i < target.length; i++) {
            if (deep_equal_1.default(target[i], value)) {
                target.splice(i, 1);
                return true;
            }
        }
    }
    else if (isObject(target)) {
        const keys = Object.keys(target);
        for (let i = 0; i < keys.length; i++) {
            if (deep_equal_1.default(target[keys[i]], value)) {
                delete target[keys[i]];
                return true;
            }
        }
    }
    return false;
}
function findAndDelete ( target , value ) { if ( ! isIterable ( target ) ) return false ; if ( isArray ( target ) ) { for ( let i = 0 ; i < target . length ; i ++ ) { if ( deep_equal_1 . default ( target [ i ] , value ) ) { target . splice ( i , 1 ) ; return true ; } } } else if ( isObject ( target ) ) { const keys = Object . keys ( target ) ; for ( let i = 0 ; i < keys . length ; i ++ ) { if ( deep_equal_1 . default ( target [ keys [ i ] ] , value ) ) { delete target [ keys [ i ] ] ; return true ; } } } return false ; }
Finds and deletes first encounter of value in target
@param target
@param value
@returns true if an element has been deleted, otherwise - false
Finds and deletes first encounter of value in target