Remove unused ol.array.flatten function

This commit is contained in:
Frederic Junod
2017-01-12 10:35:09 +01:00
parent ed79048528
commit d8c5e81675
2 changed files with 0 additions and 26 deletions
-16
View File
@@ -124,22 +124,6 @@ ol.array.reverseSubArray = function(arr, begin, end) {
};
/**
* @param {Array.<*>} arr Array.
* @return {!Array.<?>} Flattened Array.
*/
ol.array.flatten = function(arr) {
var data = arr.reduce(function(flattened, value) {
if (Array.isArray(value)) {
return flattened.concat(ol.array.flatten(value));
} else {
return flattened.concat(value);
}
}, []);
return data;
};
/**
* @param {Array.<VALUE>} arr The array to modify.
* @param {Array.<VALUE>|VALUE} data The elements or arrays of elements