UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

112 lines 4.89 kB
import { arrayBinaryIndexOf } from "./impl/array-binary-index-of.js"; import { arrayIsArray } from "./impl/array-is-array.js"; import { arrayBinaryLastIndexOf } from "./impl/array-binary-last-index-of.js"; import { arrayMap } from "./impl/array-map.js"; import { arrayCopyInto } from "./impl/array-copy-into.js"; import { arrayFlatMap } from "./impl/array-flat-map.js"; import { arrayForEach } from "./impl/array-for-each.js"; import { arrayIndex } from "./impl/array-index.js"; import { arrayIntersect } from "./impl/array-intersect.js"; import { arrayLast } from "./impl/array-last.js"; import { arrayNormalizeEmptyToUndefined } from "./impl/array-normalize-empty-to-undefined.js"; import { arrayNormalizeNullishToEmpty } from "./impl/array-normalize-nullish-to-empty.js"; import { arrayCollect } from "./impl/array-collect.js"; import { arrayRemoveMany } from "./impl/array-remove-many.js"; import { arrayRemoveOne } from "./impl/array-remove-one.js"; import { arrayReplaceOne } from "./impl/array-replace-one.js"; import { arrayCompact } from "./impl/array-compact.js"; import { arrayCompactMap } from "./impl/array-compact-map.js"; import { arrayUnion } from "./impl/array-union.js"; import { arrayPushUnique } from "./impl/array-push-unique.js"; import { arrayEmptyArray } from "./impl/array-empty-array.js"; import { arrayGenerateRange } from "./impl/array-generate-range.js"; import { arrayMapRange } from "./impl/array-map-range.js"; import { arrayContains } from "./impl/array-contains.js"; import { arrayInsertAtIndex } from "./impl/array-insert-at-index.js"; import { arraySymmetricDifference } from "./impl/array-symmetric-difference.js"; import { arraySetDifference } from "./impl/array-set-difference.js"; import { arrayIsNotEmpty } from "./impl/array-is-not-empty.js"; import { arrayUnique } from "./impl/array-unique.js"; import { arrayAddToSet } from "./impl/array-add-to-set.js"; import { arrayForEachRange } from "./impl/array-for-each-range.js"; import { arrayMax } from "./impl/array-max.js"; import { arrayMin } from "./impl/array-min.js"; import { arrayBinaryFindInsertionIndex } from "./impl/array-binary-find-insertion-index.js"; /** * @public * Utilities that apply to `Array` and `ArrayLike`. */ export class _Array { // noinspection JSUnusedLocalSymbols constructor() { } } /** {@inheritDoc arrayAddToSet} */ _Array.addToSet = arrayAddToSet; /** {@inheritDoc arrayBinaryFindInsertionIndex} */ _Array.binaryFindInsertionIndex = arrayBinaryFindInsertionIndex; /** {@inheritDoc arrayBinaryIndexOf} */ _Array.binaryIndexOf = arrayBinaryIndexOf; /** {@inheritDoc arrayBinaryLastIndexOf} */ _Array.binaryLastIndexOf = arrayBinaryLastIndexOf; /** {@inheritDoc arrayCollect} */ _Array.collect = arrayCollect; /** {@inheritDoc arrayCompact} */ _Array.compact = arrayCompact; /** {@inheritDoc arrayCompactMap} */ _Array.compactMap = arrayCompactMap; /** {@inheritDoc (arrayContains:2)} */ _Array.contains = arrayContains; /** {@inheritDoc arrayCopyInto} */ _Array.copyInto = arrayCopyInto; /** {@inheritDoc arrayEmptyArray} */ _Array.emptyArray = arrayEmptyArray; /** {@inheritDoc arrayFlatMap} */ _Array.flatMap = arrayFlatMap; /** {@inheritDoc arrayForEach} */ _Array.forEach = arrayForEach; /** {@inheritDoc arrayForEachRange} */ _Array.forEachRange = arrayForEachRange; /** {@inheritDoc arrayGenerateRange} */ _Array.generateRange = arrayGenerateRange; /** {@inheritDoc arrayIndex} */ _Array.index = arrayIndex; /** {@inheritDoc arrayInsertAtIndex} */ _Array.insertAtIndex = arrayInsertAtIndex; /** {@inheritDoc arrayIntersect} */ _Array.intersect = arrayIntersect; /** {@inheritDoc arrayIsArray} */ _Array.isArray = arrayIsArray; /** {@inheritDoc arrayIsNotEmpty} */ _Array.isNotEmpty = arrayIsNotEmpty; /** {@inheritDoc arrayLast} */ _Array.last = arrayLast; /** {@inheritDoc arrayMap} */ _Array.map = arrayMap; /** {@inheritDoc arrayMapRange} */ _Array.mapRange = arrayMapRange; /** {@inheritDoc arrayMax} */ _Array.max = arrayMax; /** {@inheritDoc arrayMin} */ _Array.min = arrayMin; /** {@inheritDoc arrayNormalizeEmptyToUndefined} */ _Array.normalizeEmptyToUndefined = arrayNormalizeEmptyToUndefined; /** {@inheritDoc arrayNormalizeNullishToEmpty} */ _Array.normalizeNullishToEmpty = arrayNormalizeNullishToEmpty; /** {@inheritDoc arrayPushUnique} */ _Array.pushUnique = arrayPushUnique; /** {@inheritDoc arrayRemoveMany} */ _Array.removeMany = arrayRemoveMany; /** {@inheritDoc arrayRemoveOne} */ _Array.removeOne = arrayRemoveOne; /** {@inheritDoc arrayReplaceOne} */ _Array.replaceOne = arrayReplaceOne; /** {@inheritDoc arraySetDifference} */ _Array.setDifference = arraySetDifference; /** {@inheritDoc arraySymmetricDifference} */ _Array.symmetricDifference = arraySymmetricDifference; /** {@inheritDoc arrayUnion} */ _Array.union = arrayUnion; /** {@inheritDoc arrayUnique} */ _Array.unique = arrayUnique; //# sourceMappingURL=_array.js.map