/** * Test if a variable is an array * @param a - The variable to test * @return If `true` the variable is an array. */ export declare const isArray: (a: unknown) => a is unknown[]; /** * Test if a variable is a function * @param f - The variable to test * @return If `true` the variable is a function. */ export declare const isFunction: (f: unknown) => f is (...rest: unknown[]) => unknown; /** * Tests if a string is a valid HEX color encoding * @param hex - HEX-encoded color string. * @return If `true` the string is a valid HEX color encoding. */ export declare const isHex: (hex: string) => boolean; /** * Tests if a number is in `[0,1]`. * @param x - Number to be tested. * @return If `true` the number is in `[0,1]`. */ export declare const isNormFloat: (x: number) => boolean; /** * Tests if an array consist of normalized numbers that are in `[0,1]` only. * @param a - Array to be tested * @return If `true` the array contains only numbers in `[0,1]`. */ export declare const isNormFloatArray: (a: number[]) => boolean; /** * Test if a variable is a number * @param x - Variable to be tested * @return If `true`, `x` is a number. */ export declare const isNumber: (x: unknown) => x is number; /** * Test if a variable is a plain object, e.g., `{}` * @param o - The variable to test * @return If `true` the variable is a plain object. */ export declare const isObject: (o: unknown) => o is T; /** * Tests if an array is encoding an RGB color. * @param rgb - Array to be tested * @return If `true` the array hold a triple of Uint8 numbers or * a triple of normalized floats. */ export declare const isRgbArray: (rgb: number[]) => boolean; /** * Tests if an array is encoding an RGBA color. * @param rgba - Array to be tested * @return If `true` the array hold a quadruple of normalized floats, * a quadruple of Uint8s, or a triple of Uint8 and one normalized float. */ export declare const isRgbaArray: (rgba: number[]) => boolean; /** * Tests if a string is encoding an RGB color. * @param str - String to be tested * @return If `true` the array hold a triple of Uint8 numbers or * a triple of normalized floats. */ export declare const isRgbStr: (str: string) => boolean; /** * Tests if a string is encoding an RGBA color. * @param str - String to be tested * @return If `true` the array hold a quadruple of Uint8 numbers or * a quadruple of normalized floats. */ export declare const isRgbaStr: (str: string) => boolean; /** * Tests if a variable is a string * @param s - Variable to be tested * @return If `true` variable is a string */ export declare const isString: (s: unknown) => s is string; /** * Tests if a number is an interger and in `[0,255]`. * @param x - Number to be tested. * @return If `true` the number is an interger and in `[0,255]`. */ export declare const isUint8: (x: number) => boolean; /** * Tests if an array consist of Uint8 numbers only. * @param a - Array to be tested. * @return If `true` the array contains only Uint8 numbers. */ export declare const isUint8Array: (a: number[]) => boolean;