Remove array.includes

This commit is contained in:
Maximilian Krög
2022-08-05 01:19:36 +02:00
parent f2c4e26468
commit 31ed30923d

View File

@@ -49,16 +49,6 @@ export function numberSafeCompareFunction(a, b) {
return a > b ? 1 : a < b ? -1 : 0;
}
/**
* Whether the array contains the given object.
* @param {Array<*>} arr The array to test for the presence of the element.
* @param {*} obj The object for which to test.
* @return {boolean} The object is in the array.
*/
export function includes(arr, obj) {
return arr.indexOf(obj) >= 0;
}
/**
* {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution} can use a function
* of this type to determine which nearest resolution to use.