Module

x/ts_morph/common/ts_morph_common.d.ts>ArrayUtils

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
class ArrayUtils
import { ArrayUtils } from "https://dotland.deno.dev/x/ts_morph@19.0.0/common/ts_morph_common.d.ts";

Constructors

new
private
ArrayUtils()

Static Methods

binaryInsertWithOverwrite<T>(
items: T[],
newItem: T,
comparer: Comparer<T>,
): void
binarySearch<T>(items: ReadonlyArray<T>, storedComparer: StoredComparer<T>): number
containsSubArray<T>(items: ReadonlyArray<T>, subArray: ReadonlyArray<T>): boolean
getUniqueItems<T>(a: ReadonlyArray<T>): T[]
groupBy<T>(items: ReadonlyArray<T>, getGroup: (item: T) => string | number): T[][]
isNullOrEmpty<T>(a: ReadonlyArray<T> | undefined): a is undefined
isReadonlyArray<T>(a: unknown): a is ReadonlyArray<T>
removeAll<T>(a: T[], isMatch: (item: T) => boolean): T[]
removeFirst<T>(a: T[], item: T): boolean
sortByProperty<T>(items: T[], getProp: (item: T) => string | number): T[]
toIterator<T>(items: ReadonlyArray<T>): Generator<T, void, unknown>