coersystem
Version:
Library for Angular projects
36 lines (35 loc) • 1.71 kB
TypeScript
/** Generic Methods */
export declare const Tools: {
/** Generates a guid */
GetGuid: (seed?: string) => string;
/** Returns true if the value is null or undefined, false otherwise */
IsNull: (value: any) => boolean;
/** Returns true if the value is not null or undefined, false otherwise */
IsNotNull: (value: any) => boolean;
/** Returns true if the value is null or undefined or is an empty string or contains only whitespace, false otherwise */
IsOnlyWhiteSpace: (value: any) => boolean;
/** Returns true if it has a string value and is not all whitespace, false otherwise */
IsNotOnlyWhiteSpace: (value: any) => boolean;
/** Avoids null value and responds with the specified type */
AvoidNull: <T>(value: T | null | undefined, type?: "string" | "number" | "boolean") => T;
/** Break reference of a object or array */
BreakReference: <T>(object: T) => T;
/** Get properties of an object */
GetPropertyList: <T>(object: T | object | null | undefined) => string[];
/** */
HasProperty: (object: any, property: string) => boolean;
/** */
IsBoolean: (object: any, property?: string) => boolean;
/** */
IsBooleanTrue: (object: any, property?: string) => boolean;
/** */
IsBooleanFalse: (object: any, property?: string) => boolean;
/** */
IsString: (object: any, property?: string) => boolean;
/** */
IsFunction: (object: any, property?: string) => boolean;
/** Wait the time indicated */
Sleep: (milliseconds?: number, reference?: string | null) => Promise<void>;
/** Send text to the computer's clipboard */
Clipboard: (text: string, message?: string, title?: string) => void;
};