@theoplayer/react-native-engage
Version:
Engage connector for @theoplayer/react-native
17 lines (16 loc) • 372 B
JavaScript
;
export function arrayRemoveElement(array, element) {
const index = array.indexOf(element);
if (index === -1) {
return false;
}
arrayRemoveAt(array, index);
return true;
}
export function arrayRemoveAt(array, index) {
array.splice(index, 1);
}
export function emptyArray(source) {
source.length = 0;
}
//# sourceMappingURL=ArrayUtils.js.map