Removes value from an array.
Presence of value (and its position in an array) is determined via `Array.prototype.indexOf`
@static
@memberOf fabric.util
@method removeFromArray
@param {Array} array
@param {Any} value
@return {Array} original array
173738
function removeFromArray(array, value) {
    var idx = array.indexOf(value);
    if (idx !== -1) {
      array.splice(idx, 1);
    }
    return array;
  }
410923
function removeFromArray(array, value, opt_notype) {
    var shift = 0;
    for (var i = 0; i < array.length; ++i) {
        if (array[i] === value || (opt_notype && array[i] === value)) {
            array.splice(i--, 1);
            shift++;
        }
    }
    return shift;
}
173290
function pullByValue(arr, value) {
    for (let i = 0; i < arr.length; i++) {
        if (arr[i] === value) {
            shift(arr, i);
            return value;
        }
    }

    return undefined;
}
673145
static public Object[] remove(Object[] array, Object key)
    {
        return remove(array, key, true);
    }
660914
function arrayHas(value, array) {
    error_if_not_array_1.errorIfNotArray(array);
    return (array.length > 0 && (array_get_indexes_1.getFirstIndexOf(value, array) > -1));
}
248514
function cleanArray(array) {
        var newArray = [];

        for (var i = 0, len = array.length; i < len; i += 1) {
            if (array[i]) {
                newArray.push(array[i]);
            }
        }

        return newArray;
    }
779147
public static Expression arrayRemove(JsonArray array, Expression value) {
        return arrayRemove(x(array), value);
    }
1207815
function(recentEntryArray, value) {
			var indexOfElement = -1;
			
			recentEntryArray.some(function(entry, index){
				if (entry.value === value) {
					indexOfElement = index;
					return true;
				}
				return false;
			});
			
			return indexOfElement;
		}
528294
function flattenDown (array, result) {
  for (var i = 0; i < array.length; i++) {
    var value = array[i]

    if (Array.isArray(value)) {
      flattenDown(value, result)
    } else {
      result.push(value)
    }
  }

  return result
}
930214
function remove(arr1, arr2) {
  if (!Array.isArray(arr1) || !Array.isArray(arr2)) {
    throw new Error('expected both arguments to be arrays');
  }
  var result = [];
  var len = arr1.length;
  for (var i = 0; i < len; i++) {
    var elem = arr1[i];
    if (arr2.indexOf(elem) == -1) {
      result.push(elem);
    }
  }
  return result;
}
881575
public static int[] removeFromIntArray(int[] a, int value) {
		
		if(a == null) {
			throw new NullPointerException("Array was null");
		}
		
		int index = -1;
		for(int i = 0; i < a.length; i++) {
			if(a[i] == value) {
				index = i;
				break;
			}
		}
		if(index < 0) {
			throw new IllegalArgumentException(String.format("Element %d not found in array", value));
		}
		
		int[] array = new int[a.length - 1];
		if(index > 0) {
			System.arraycopy(a, 0, array, 0, index);
		}
		if(index < a.length) {
			System.arraycopy(a, index + 1, array, index, array.length - index);
		}
		
		return array;
	}
1021690
public function removeValue($value, array &$array): bool
    {
        if (false !== ($intPosition = array_search($value, $array))) {
            unset($array[$intPosition]);

            return true;
        }

        return false;
    }
800747
function(arr, value) {
        var inx = arr.indexOf(value);
        var endIndex = arr.length - 1;
        if (inx !== endIndex) {
            var temp = arr[endIndex];
            arr[endIndex] = arr[inx];
            arr[inx] = temp;
        }
        arr.pop();
    }
1334610
function ( obj, fn ) {
		if ( typeof fn !== "function" ) {
			throw new Error( label.error.invalidArguments );
		}

		var remove = [];

		array.each( obj, function ( i ) {
			if ( fn( i ) !== false ) {
				remove.push( i );
			}
			else {
				return false;
			}
		});

		array.each( remove, function ( i ) {
			array.remove( obj, array.index( obj, i) );
		});

		return obj;
	}
44295
function erase(arr, item) {
	var i = arr.length;
	while (i--) {
		if (arr[i] === item) {
			arr.splice(i, 1);
			break;
		}
	}
	//return arr;
}
324458
function(value)
	{
		var keys = this.getKeys(value);
		var output = null;
		var i;
		var len = keys.length;

		// array
		if ( value instanceof Array )
			/*( 1 == len && '0' == keys[0] )
			||
			( len > 1 && this.reduceArray(keys, function(v,w){return Math.floor(v+w);}, 0) == len * (len - 1) / 2) )*/
		{
			output = [];
			for ( i = 0; i < len; i++ )
			{
				output.push(this.dump(value[keys[i]]));
			}

			return '['+output.join(', ')+']';
		}

		// mapping
		output = [];
		for ( i = 0; i < len; i++ )
		{
			output.push(this.dump(keys[i])+': '+this.dump(value[keys[i]]));
		}

		return '{ '+output.join(', ')+' }';
	}
264922
function(key, value) {
        this._removeRemove(this.sets.remove, key);
        var op = this._getOp(this.sets.adds, key);
        if (op) {
            op.add.push(value);
        } else {
            this.sets.adds.push({key: key, add: [value]});
        }
        return this;
    }