UNPKG

@optimizely/optimizely-sdk

Version:

JavaScript SDK for Optimizely Feature Experimentation, Optimizely Full Stack (legacy), and Optimizely Rollouts

42 lines (41 loc) 1.79 kB
import { Platform } from '../../platform_support'; export declare function currentTimestamp(): number; export declare function isSafeInteger(number: unknown): boolean; export declare function keyBy<K>(arr: K[], key: string): Record<string, K>; export declare function assignBy<K>(arr: K[], key: string, base: Record<string, K>): void; declare function isNumber(value: unknown): boolean; export declare function uuid(): string; export type Omit<T, K> = Pick<T, Exclude<keyof T, K>>; export declare function getTimestamp(): number; export declare function groupBy<K>(arr: K[], grouperFn: (item: K) => string): Array<K[]>; export declare function objectValues<K>(obj: { [key: string]: K; }): K[]; export declare function objectEntries<K>(obj: { [key: string]: K; }): [string, K][]; export declare function find<K>(arr: K[], cond: (arg: K) => boolean): K | undefined; export declare function sprintf(format: string, ...args: any[]): string; /** * Checks two string arrays for equality. * @param arrayA First Array to be compared against. * @param arrayB Second Array to be compared against. * @returns {boolean} True if both arrays are equal, otherwise returns false. */ export declare function checkArrayEquality(arrayA: string[], arrayB: string[]): boolean; declare const _default: { checkArrayEquality: typeof checkArrayEquality; currentTimestamp: typeof currentTimestamp; isSafeInteger: typeof isSafeInteger; keyBy: typeof keyBy; uuid: typeof uuid; isNumber: typeof isNumber; getTimestamp: typeof getTimestamp; groupBy: typeof groupBy; objectValues: typeof objectValues; objectEntries: typeof objectEntries; find: typeof find; sprintf: typeof sprintf; }; export default _default; export declare const __platforms: Platform[];