cli-block
Version:
Create nice looking CLI Blocks
36 lines (35 loc) • 1.6 kB
TypeScript
export declare const strWidth: any;
export declare const objectToString: (obj: any) => string;
export declare const toStringValue: (value: any) => any;
export declare const spaces: (num: number, value?: any) => string;
export declare const spacedText: (num: number, value: string) => string;
declare const ValueType: {
STRING: string;
NUMBER: string;
COLOR: string;
ARRAY: string;
OBJECT: string;
BOOLEAN: string;
PATH: string;
UNDEFINED: string;
NULL: string;
};
type ValueType = (typeof ValueType)[keyof typeof ValueType];
export declare const isUndefined: (value: any) => boolean;
export declare const isString: (value: any) => boolean;
export declare const isNumber: (value: any) => boolean;
export declare const isNumeric: (value: any) => boolean;
export declare const isArray: (value: any) => boolean;
export declare const isObject: (value: any) => boolean;
export declare const isColor: (value: any) => boolean;
export declare const isBoolean: (value: any) => boolean;
export declare const isBooleanish: (value: any) => boolean;
export declare const isNull: (value: any) => boolean;
export declare const isPath: (value: any) => any;
export declare const isTrue: (value: any) => boolean;
export declare const defineValueType: (value: any) => ValueType;
export declare const stylizeValue: (value: any) => any;
export declare const centerText: (value: string, num: number) => string;
export declare const truncateText: (value: string, width: number, affix?: string) => string;
export declare const breakText: (value: string, width: number) => any[];
export {};