@jswalden/streaming-json
Version:
Streaming JSON parsing and stringification for JavaScript/TypeScript
19 lines (18 loc) • 659 B
TypeScript
/**
* Determine whether a value is an `Array`.
*
* Note that a proxy whose target is an `Array` will satisfy this test.
*
* @see https://tc39.es/ecma262/#sec-isarray
*/
export declare const IsArray: (arg: any) => arg is any[];
/** Append a value to an array. */
export declare function Push<T>(arr: T[], t: NoInfer<T>): void;
/**
* Pop the last element from an array and return it.
*
* This function may not be called on an empty array.
*/
export declare const Pop: <T>(arr: T[]) => T;
/** Determine whether an array contains an element that satisfies `pred`. */
export declare function ArrayFind<T>(arr: T[], pred: (value: T) => boolean): boolean;