UNPKG

@alauda-fe/common

Version:

Alauda frontend team common codes.

22 lines (21 loc) 1.2 kB
export declare const CORE_UNITS: string[]; export declare const CORE_UNIT_REG: RegExp; export declare const toUnitNumM: (coreStr?: string | number) => string; export declare const toUnitNum: (coreStr?: string | number) => string; export declare const UNITS: string[]; export declare const UNIT_REG: RegExp; export declare const toUnitI: (str?: string | number, negative?: boolean) => string; export declare const toUnitMi: (str?: string | number, negative?: boolean) => string; export declare const toUnitGi: (str?: string | number, negative?: boolean) => string; export declare const addUnitCoreM: (coreStr?: string | number) => string; export declare const addUnitMi: (miStr?: string | number) => string; export declare const addUnitGi: (giStr?: string | number) => string; export declare function getAppropriateMemory(base: number): { value: number; unit: string; }; export declare const parseValueAndUnit: (str: string) => string[]; export declare function formatMemory(mem: string): number; export declare function getMemory(base: number, unit: string): number; export declare function getCpu(base: number, unit: string): number; export declare function formatCPU(cpu: string): number;