@techmely/utils
Version:
Collection of helpful JavaScript / TypeScript utils
17 lines (14 loc) • 1.02 kB
TypeScript
import { NullList, EntityId, UnDef } from '@techmely/types';
declare function formatNumber(num: NullList<EntityId>, precision?: number, defaultValue?: UnDef<EntityId>): EntityId;
declare function formatLot10Volume(volume: NullList<EntityId>, precision?: number, defaultValue?: UnDef<EntityId>): EntityId;
declare function Strip(num: EntityId, precision?: number): number;
declare function DigitLength(num: EntityId): number;
declare function Float2Fixed(num: EntityId): number;
declare function CheckBoundary(num: number): void;
declare const Times: (...nums: EntityId[]) => number;
declare const Plus: (...nums: EntityId[]) => number;
declare const Minus: (...nums: EntityId[]) => number;
declare const Divide: (...nums: EntityId[]) => number;
declare function Round(num: EntityId, decimal: number): number;
declare function EnableBoundaryChecking(flag?: boolean): void;
export { CheckBoundary, DigitLength, Divide, EnableBoundaryChecking, Float2Fixed, Minus, Plus, Round, Strip, Times, formatLot10Volume, formatNumber };