UNPKG

@sildeswj/common-libraries

Version:

This is common libraries used for all refeed projects

21 lines 1.08 kB
export type LocaleType = 'ko' | 'vn' | 'en' | 'jp' | null; export declare const currencyFormat: (num: number | string, locale?: LocaleType, fixedNumber?: number, includeCurrencySymbol?: boolean) => string; export declare const numberFormat: (num: number | string, locale?: LocaleType, fixedNumber?: number) => string; export declare const errorConvertor: (err: any) => { errorStatus: number; errorMessage: string; }; export declare const calculateTotalPrice: ({ measureOptions, actualCollectionKg, actualCollectionVolume, pricePerKg, pricePerCan, }: { measureOptions: string; actualCollectionKg: number; actualCollectionVolume: number; pricePerKg: number; pricePerCan: number; }) => number; export declare const calculateTotalPriceSubtractedNewOilTotalPrice: (totalPrice: number, newOilTotalPrice: number) => number; /** * Rounds a number to 2 decimal places * Examples: 23.3423423 -> 23.34, 4.5 -> 4.5, 4 -> 4, 94.889 -> 94.89 */ export declare const roundToTwoDecimals: (value: number | undefined | null) => number; //# sourceMappingURL=utils.d.ts.map