UNPKG

flagpole

Version:

Simple and fast DOM integration, headless or headful browser, and REST API testing framework.

46 lines (45 loc) 3.05 kB
import { iMessageAndCallback, IteratorCallback } from "./interfaces"; export declare const arrayify: <T>(value: any) => T[]; export declare const jsonParse: (json: string) => any; export declare function isNullOrUndefined(obj: any): boolean; export declare function isAsyncCallback(func: Function): boolean; export declare function isArray(obj: any): boolean; export declare function toType(obj: any): string; export declare function arrayUnique(arr: any): any[]; export declare function uniqueId(): string; export declare function openInBrowser(content: string): Promise<string>; export declare function runAsync(callback: Function, delay?: number): void; export declare function asyncForEachUntilFirst(array: any[], callback: IteratorCallback): Promise<any>; export declare function asyncForEach(array: any[], callback: IteratorCallback): Promise<void>; export declare function asyncWhich(array: any[], callback: IteratorCallback): Promise<unknown>; export declare function asyncWhichFails(array: any[], callback: IteratorCallback): Promise<unknown>; export declare function asyncEvery(array: any[], callback: IteratorCallback): Promise<boolean>; export declare function asyncFilter(array: any[], callback: IteratorCallback): Promise<any[]>; export declare const asyncMap: <T>(array: any[], callback: IteratorCallback) => Promise<T[]>; export declare const asyncFlatMap: <T>(array: any[], callback: IteratorCallback) => Promise<T[]>; export declare const asyncMapToObject: <T>(array: string[], callback: IteratorCallback) => Promise<{ [key: string]: T; }>; export declare function asyncNone(array: any[], callback: IteratorCallback): Promise<boolean>; export declare function asyncSome(array: any[], callback: IteratorCallback): Promise<boolean>; export declare const flatten: <T>(items: any[] | { [key: string]: any; }) => T[]; export declare const arrayEquals: (a: any, b: any) => boolean; export declare const arrayExactly: (a: any, b: any) => boolean; export declare function normalizePath(uri: string): string; export declare function ensureFolderExists(path: string): void; export declare function emptyFolder(folderPath: string): Promise<void>; export declare function exitProcess(passed: boolean): void; export declare function getMessageAndCallbackFromOverloading(a: any, b: any, defaultMessage?: string): iMessageAndCallback; export declare const deepEqual: (thisValue: any, thatValue: any) => boolean; export declare const deepStrictEqual: (thisValue: any, thatValue: any) => boolean; export declare const objectContains: (thisValue: any, thatValue: any) => boolean; export declare const objectContainsKeys: (thisValue: any, keys: any) => boolean; export declare const firstIn: (obj: any) => any; export declare const middleIn: (obj: any) => any; export declare const lastIn: (obj: any) => any; export declare const random: (min: number, max: number) => number; export declare const randomInt: (min: number, max: number) => number; export declare const randomIn: (obj: any) => any; export declare const cast: <T>(val: any) => T;