UNPKG

@theoplayer/react-native-engage

Version:
23 lines (22 loc) 537 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.arrayRemoveAt = arrayRemoveAt; exports.arrayRemoveElement = arrayRemoveElement; exports.emptyArray = emptyArray; function arrayRemoveElement(array, element) { const index = array.indexOf(element); if (index === -1) { return false; } arrayRemoveAt(array, index); return true; } function arrayRemoveAt(array, index) { array.splice(index, 1); } function emptyArray(source) { source.length = 0; } //# sourceMappingURL=ArrayUtils.js.map