@circe/core
Version:
Circe Components for Angular :: Core Services and Tools
54 lines (53 loc) • 2.21 kB
TypeScript
import { NpaSingleData, NpaStringTransform } from '../_types/data.types';
export declare class ToolService {
months: Array<string>;
yiqHumanThreshold: number;
constructor();
static getValueFromMultiLevelObject(object: any, key: string, separator?: string): any;
static setValueInMultiLevelObject(object: any, key: string, value: any, separator?: string): any;
static waitFor(milliseconds: number): void;
/**
* repeatedValuesInArray
* @description
* This method returns an array of uniques values if parameter "unique" is true; or returns
* an array of ONLY repeated values (unique values are discarded) if unique is false.
* Default value por parameter unique is true.
*/
static repeatedValuesInArray(values: Array<NpaSingleData>, unique?: boolean): Array<NpaSingleData>;
static checkLastChar(text: string, char: string): string;
static hexToRgb(hex: string): Array<number>;
static rgbToHex(r: number, g: number, b: number): string;
static rgbToCmyk(r: number, g: number, b: number): Array<number>;
/**
* getColorYIQ
* @description
* This method returns de YIQ model (color space) from a given color.
* Can receive single argument (hex color string) or three number arguments (rgb color).
*/
static getColorYIQ(...arg: Array<any>): number;
/**
* generateUuid
* @description
* Generates a new uuid using uuid dependency.
*/
static generateUuid(): string;
/**
* checkArray
* @description
* Returns true if parameter given "array" is an array, otherwise returns false;
* If optional parameter "filled" is given, then this method checks the array is not empty.
* Default value for "filled" is true.
*/
static checkArray(array: any, filled?: boolean): boolean;
static isEmail(email: string): boolean;
/**
* @deprecated
*/
static getValueFromDotedKey(object: any, dotedKey: string, separator?: string): any;
/**
* @deprecated
*/
static formatString(text: string): string;
identifier<T>(index: number, item: T): T;
stringTransform(text: string, transformType?: NpaStringTransform): string;
}