UNPKG

@fnlb-project/stanza

Version:

Modern XMPP in the browser, with a JSON API

18 lines (17 loc) 830 B
/** * Portions of this file are derived from prior work. * * See NOTICE.md for full license text. * * Derived from: * - uuid, Copyright (c) 2010-2016 Robert Kieffer and other contributors */ export declare function timeoutPromise<T>(target: Promise<T>, delay: number, rejectValue?: () => any): Promise<T>; export declare function promiseAny<T>(promises: Array<Promise<T>>): Promise<T>; export declare function shuffle<T>(array: T[]): T[]; export declare function sleep(time: number): Promise<void>; export declare function octetCompare(str1: string | Buffer, str2: string | Buffer): number; export declare function uuid(): string; export declare function reviveData(key: string, value: unknown): unknown; export declare function ucs2Encode(arr: number[]): string; export declare function ucs2Decode(str: string): number[];