dinero.js
Version:
Create, calculate, and format money in JavaScript and TypeScript
609 lines (608 loc) • 23.6 kB
TypeScript
import { t as DineroCurrency } from "./DineroCurrency-DpSMrUwZ.js";
//#region src/core/types/DineroBinaryOperation.d.ts
type DineroBinaryOperation<TInput, TOutput = TInput> = (a: TInput, b: TInput) => TOutput;
//#endregion
//#region src/core/types/DineroCalculator.d.ts
declare enum DineroComparisonOperator {
LT = -1,
EQ = 0,
GT = 1
}
type DineroCalculator<TInput> = {
readonly add: DineroBinaryOperation<TInput>;
readonly compare: DineroBinaryOperation<TInput, DineroComparisonOperator>;
readonly decrement: DineroUnaryOperation<TInput>;
readonly integerDivide: DineroBinaryOperation<TInput>;
readonly increment: DineroUnaryOperation<TInput>;
readonly modulo: DineroBinaryOperation<TInput>;
readonly multiply: DineroBinaryOperation<TInput>;
readonly power: DineroBinaryOperation<TInput>;
readonly subtract: DineroBinaryOperation<TInput>;
readonly zero: () => TInput;
};
//#endregion
//#region src/core/types/Dinero.d.ts
type Dinero<TAmount, TCurrency extends string = string> = {
readonly calculator: DineroCalculator<TAmount>;
readonly formatter: DineroFormatter<TAmount>;
readonly create: <TC extends string = TCurrency>(options: DineroOptions<TAmount, TC>) => Dinero<TAmount, TC>;
readonly toJSON: () => DineroSnapshot<TAmount, TCurrency>;
};
//#endregion
//#region src/core/types/DineroFactory.d.ts
type DineroFactory<TAmount> = <TCurrency extends string>({
amount,
currency,
scale
}: DineroOptions<TAmount, TCurrency>) => Dinero<TAmount, TCurrency>;
//#endregion
//#region src/core/types/DineroOptions.d.ts
type DineroOptions<TAmount, TCurrency extends string = string> = {
readonly amount: TAmount;
readonly currency: DineroCurrency<TAmount, TCurrency>;
readonly scale?: TAmount;
};
//#endregion
//#region src/core/types/DineroSnapshot.d.ts
type DineroSnapshot<TAmount, TCurrency extends string = string> = {
readonly amount: TAmount;
readonly currency: DineroCurrency<TAmount, TCurrency>;
readonly scale: TAmount;
};
//#endregion
//#region src/core/types/DineroDivideOperation.d.ts
type DineroDivideOperation = <TAmount>(amount: TAmount, factor: TAmount, calculator: DineroCalculator<TAmount>) => TAmount;
//#endregion
//#region src/core/types/DineroFormatter.d.ts
type DineroFormatter<TAmount> = {
readonly toNumber: (value?: TAmount) => number;
readonly toString: (value?: TAmount) => string;
};
//#endregion
//#region src/core/types/DineroScaledAmount.d.ts
type DineroScaledAmount<TAmount> = {
readonly amount: TAmount;
readonly scale?: TAmount;
};
//#endregion
//#region src/core/types/DineroRates.d.ts
type DineroRate<TAmount> = DineroScaledAmount<TAmount> | TAmount;
type DineroRates<TAmount> = Record<string, DineroRate<TAmount>>;
//#endregion
//#region src/core/types/DineroTransformer.d.ts
type TransformerOptions<TAmount, TValue, TCurrency extends string = string> = {
readonly value: TValue;
readonly currency: DineroCurrency<TAmount, TCurrency>;
};
type DineroTransformer<TAmount, TOutput, TValue, TCurrency extends string = string> = (options: TransformerOptions<TAmount, TValue, TCurrency>) => TOutput;
//#endregion
//#region src/core/types/DineroUnaryOperation.d.ts
type DineroUnaryOperation<TInput, TOutput = TInput> = (value: TInput) => TOutput;
//#endregion
//#region src/core/api/add.d.ts
type AddParams<TAmount, TCurrency extends string = string> = readonly [augend: Dinero<TAmount, TCurrency>, addend: Dinero<TAmount, NoInfer<TCurrency>>];
//#endregion
//#region src/core/api/allocate.d.ts
type AllocateParams<TAmount, TCurrency extends string = string> = readonly [dineroObject: Dinero<TAmount, TCurrency>, ratios: ReadonlyArray<DineroScaledAmount<TAmount> | TAmount>];
//#endregion
//#region src/core/api/compare.d.ts
type CompareParams<TAmount, TCurrency extends string = string> = readonly [dineroObject: Dinero<TAmount, TCurrency>, comparator: Dinero<TAmount, NoInfer<TCurrency>>];
//#endregion
//#region src/core/api/convert.d.ts
type ConvertParams<TAmount, TCurrency extends string = string, TNewCurrency extends string = string> = readonly [dineroObject: Dinero<TAmount, TCurrency>, newCurrency: DineroCurrency<TAmount, TNewCurrency>, rates: DineroRates<TAmount>];
//#endregion
//#region src/core/api/equal.d.ts
type EqualParams<TAmount, TCurrency extends string = string> = readonly [dineroObject: Dinero<TAmount, TCurrency>, comparator: Dinero<TAmount, NoInfer<TCurrency>>];
//#endregion
//#region src/core/api/greaterThan.d.ts
type GreaterThanParams<TAmount, TCurrency extends string = string> = readonly [dineroObject: Dinero<TAmount, TCurrency>, comparator: Dinero<TAmount, NoInfer<TCurrency>>];
//#endregion
//#region src/core/api/greaterThanOrEqual.d.ts
type GreaterThanOrEqualParams<TAmount, TCurrency extends string = string> = readonly [dineroObject: Dinero<TAmount, TCurrency>, comparator: Dinero<TAmount, NoInfer<TCurrency>>];
//#endregion
//#region src/core/api/hasSubUnits.d.ts
type HasSubUnitsParams<TAmount> = readonly [dineroObject: Dinero<TAmount>];
//#endregion
//#region src/core/api/haveSameAmount.d.ts
type HaveSameAmountParams<TAmount, TCurrency extends string = string> = readonly [dineroObjects: readonly [Dinero<TAmount, TCurrency>, ...Dinero<TAmount, NoInfer<TCurrency>>[]]];
//#endregion
//#region src/core/api/haveSameCurrency.d.ts
declare function haveSameCurrency$1<TAmount>(dineroObjects: ReadonlyArray<Dinero<TAmount>>): boolean;
//#endregion
//#region src/core/api/isNegative.d.ts
type IsNegativeParams<TAmount> = readonly [dineroObject: Dinero<TAmount>];
//#endregion
//#region src/core/api/isPositive.d.ts
type IsPositiveParams<TAmount> = readonly [dineroObject: Dinero<TAmount>];
//#endregion
//#region src/core/api/isZero.d.ts
type IsZeroParams<TAmount> = readonly [dineroObject: Dinero<TAmount>];
//#endregion
//#region src/core/api/lessThan.d.ts
type LessThanParams<TAmount, TCurrency extends string = string> = readonly [dineroObject: Dinero<TAmount, TCurrency>, comparator: Dinero<TAmount, NoInfer<TCurrency>>];
//#endregion
//#region src/core/api/lessThanOrEqual.d.ts
type LessThanOrEqualParams<TAmount, TCurrency extends string = string> = readonly [dineroObject: Dinero<TAmount, TCurrency>, comparator: Dinero<TAmount, NoInfer<TCurrency>>];
//#endregion
//#region src/core/api/maximum.d.ts
type MaximumParams<TAmount, TCurrency extends string = string> = readonly [dineroObjects: readonly [Dinero<TAmount, TCurrency>, ...Dinero<TAmount, NoInfer<TCurrency>>[]]];
//#endregion
//#region src/core/api/minimum.d.ts
type MinimumParams<TAmount, TCurrency extends string = string> = readonly [dineroObjects: readonly [Dinero<TAmount, TCurrency>, ...Dinero<TAmount, NoInfer<TCurrency>>[]]];
//#endregion
//#region src/core/api/multiply.d.ts
type MultiplyParams<TAmount, TCurrency extends string = string> = readonly [multiplicand: Dinero<TAmount, TCurrency>, multiplier: DineroScaledAmount<TAmount> | TAmount];
//#endregion
//#region src/core/api/normalizeScale.d.ts
type NormalizeScaleParams<TAmount, TCurrency extends string = string> = readonly [dineroObjects: readonly [Dinero<TAmount, TCurrency>, ...Dinero<TAmount, NoInfer<TCurrency>>[]]];
//#endregion
//#region src/core/api/subtract.d.ts
type SubtractParams<TAmount, TCurrency extends string = string> = readonly [minuend: Dinero<TAmount, TCurrency>, subtrahend: Dinero<TAmount, NoInfer<TCurrency>>];
//#endregion
//#region src/core/api/toSnapshot.d.ts
declare function toSnapshot$1<TAmount, TCurrency extends string>(dineroObject: Dinero<TAmount, TCurrency>): DineroSnapshot<TAmount, TCurrency>;
//#endregion
//#region src/core/api/transformScale.d.ts
type TransformScaleParams<TAmount, TCurrency extends string = string> = readonly [dineroObject: Dinero<TAmount, TCurrency>, newScale: TAmount, divide?: DineroDivideOperation];
//#endregion
//#region src/core/api/trimScale.d.ts
type TrimScaleParams<TAmount, TCurrency extends string = string> = readonly [dineroObject: Dinero<TAmount, TCurrency>];
//#endregion
//#region src/core/helpers/createDinero.d.ts
type CreateDineroOptions<TAmount> = {
readonly calculator: DineroCalculator<TAmount>;
readonly formatter?: DineroFormatter<TAmount>;
readonly onCreate?: (options: DineroOptions<TAmount, string>) => void;
};
declare function createDinero<TAmount>({
calculator,
onCreate,
formatter
}: CreateDineroOptions<TAmount>): <TCurrency extends string>({
amount,
currency: {
code,
base,
exponent
},
scale
}: DineroOptions<TAmount, TCurrency>) => Dinero<TAmount, TCurrency>;
//#endregion
//#region src/core/divide/down.d.ts
/**
* Divide and round down.
*
* Rounding down happens whenever the quotient is not an integer.
*
* @param amount - The amount to divide.
* @param factor - The factor to divide by.
* @param calculator - The calculator to use.
*
* @returns The rounded amount.
*/
declare const down: DineroDivideOperation;
//#endregion
//#region src/core/divide/halfAwayFromZero.d.ts
/**
* Divide and round towards "nearest neighbor" unless both neighbors are
* equidistant, in which case round away from zero.
*
* @param amount - The amount to divide.
* @param factor - The factor to divide by.
* @param calculator - The calculator to use.
*
* @returns The rounded amount.
*/
declare const halfAwayFromZero: DineroDivideOperation;
//#endregion
//#region src/core/divide/halfDown.d.ts
/**
* Divide and round towards "nearest neighbor" unless both neighbors are
* equidistant, in which case round down.
*
* Rounding down happens when:
* - The quotient is half (e.g., -1.5, 1.5).
* - The quotient is positive and less than half (e.g., 1.4).
* - The quotient is negative and greater than half (e.g., -1.6).
*
* @param amount - The amount to divide.
* @param factor - The factor to divide by.
* @param calculator - The calculator to use.
*
* @returns The rounded amount.
*/
declare const halfDown: DineroDivideOperation;
//#endregion
//#region src/core/divide/halfEven.d.ts
/**
* Divide and round towards "nearest neighbor" unless both neighbors are
* equidistant, in which case round to the nearest even integer.
*
* @param amount - The amount to divide.
* @param factor - The factor to divide by.
* @param calculator - The calculator to use.
*
* @returns The rounded amount.
*/
declare const halfEven: DineroDivideOperation;
//#endregion
//#region src/core/divide/halfOdd.d.ts
/**
* Divide and round towards "nearest neighbor" unless both neighbors are
* equidistant, in which case round to the nearest odd integer.
*
* @param amount - The amount to divide.
* @param factor - The factor to divide by.
* @param calculator - The calculator to use.
*
* @returns The rounded amount.
*/
declare const halfOdd: DineroDivideOperation;
//#endregion
//#region src/core/divide/halfTowardsZero.d.ts
/**
* Divide and round towards "nearest neighbor" unless both neighbors are
* equidistant, in which case round towards zero.
*
* @param amount - The amount to divide.
* @param factor - The factor to divide by.
* @param calculator - The calculator to use.
*
* @returns The rounded amount.
*/
declare const halfTowardsZero: DineroDivideOperation;
//#endregion
//#region src/core/divide/halfUp.d.ts
/**
* Divide and round towards "nearest neighbor" unless both neighbors are
* equidistant, in which case round up.
*
* Rounding up happens when:
* - The quotient is half (e.g., -1.5, 1.5).
* - The quotient is positive and greater than half (e.g., 1.6).
* - The quotient is negative and less than half (e.g., -1.4).
*
* @param amount - The amount to divide.
* @param factor - The factor to divide by.
* @param calculator - The calculator to use.
*
* @returns The rounded amount.
*/
declare const halfUp: DineroDivideOperation;
//#endregion
//#region src/core/divide/up.d.ts
/**
* Divide and round up.
*
* Rounding up happens whenever the quotient is not an integer.
*
* @param amount - The amount to divide.
* @param factor - The factor to divide by.
* @param calculator - The calculator to use.
*
* @returns The rounded amount.
*/
declare const up: DineroDivideOperation;
//#endregion
//#region src/api/add.d.ts
/**
* Add up the passed Dinero objects.
*
* @param augend - The Dinero object to add to.
* @param addend - The Dinero object to add.
*
* @returns A new Dinero object.
*
* @public
*/
declare function add<TAmount, TCurrency extends string>(...[augend, addend]: AddParams<TAmount, TCurrency>): Dinero<TAmount, TCurrency>;
//#endregion
//#region src/api/allocate.d.ts
/**
* Distribute the amount of a Dinero object across a list of ratios.
*
* @param dineroObject - The Dinero object to allocate from.
* @param ratios - The ratios to allocate the amount to.
*
* @returns A new Dinero object.
*
* @public
*/
declare function allocate<TAmount, TCurrency extends string>(...[dineroObject, ratios]: AllocateParams<TAmount, TCurrency>): Dinero<TAmount, TCurrency>[];
//#endregion
//#region src/api/compare.d.ts
/**
* Compare the value of a Dinero object relative to another.
*
* @param dineroObject - The Dinero object to compare.
* @param comparator - The Dinero object to compare to.
*
* @returns One of -1, 0, or 1 depending on whether the first Dinero object is less than, equal to, or greater than the other.
*
* @public
*/
declare function compare<TAmount, TCurrency extends string>(...[dineroObject, comparator]: CompareParams<TAmount, TCurrency>): DineroComparisonOperator;
//#endregion
//#region src/api/convert.d.ts
/**
* Convert a Dinero object to another currency.
*
* @param dineroObject - The Dinero object to format.
* @param newCurrency - The currency to convert to.
* @param rates - The rates to convert with.
*
* @returns A converted Dinero object.
*
* @public
*/
declare function convert<TAmount, TCurrency extends string, TNewCurrency extends string>(...[dineroObject, newCurrency, rates]: ConvertParams<TAmount, TCurrency, TNewCurrency>): Dinero<TAmount, TNewCurrency>;
//#endregion
//#region src/api/equal.d.ts
/**
* Check whether the value of a Dinero object is equal to another.
*
* @param dineroObject - The first Dinero object to compare.
* @param comparator - The second Dinero object to compare.
*
* @returns Whether the Dinero objects are equal.
*
* @public
*/
declare function equal<TAmount, TCurrency extends string>(...[dineroObject, comparator]: EqualParams<TAmount, TCurrency>): boolean;
//#endregion
//#region src/api/greaterThan.d.ts
/**
* Check whether the value of a Dinero object is greater than another.
*
* @param dineroObject - The Dinero object to compare.
* @param comparator - The Dinero object to compare to.
*
* @returns Whether the Dinero to compare is greater than the other.
*
* @public
*/
declare function greaterThan<TAmount, TCurrency extends string>(...[dineroObject, comparator]: GreaterThanParams<TAmount, TCurrency>): boolean;
//#endregion
//#region src/api/greaterThanOrEqual.d.ts
/**
* Check whether the value of a Dinero object is greater than or equal another.
*
* @param dineroObject - The Dinero object to compare.
* @param comparator - The Dinero object to compare to.
*
* @returns Whether the Dinero to compare is greater than or equal the other.
*
* @public
*/
declare function greaterThanOrEqual<TAmount, TCurrency extends string>(...[dineroObject, comparator]: GreaterThanOrEqualParams<TAmount, TCurrency>): boolean;
//#endregion
//#region src/api/hasSubUnits.d.ts
/**
* Check whether a Dinero object has minor currency units.
*
* @param dineroObject - The Dinero object to check.
*
* @returns Whether the Dinero object has minor currency units.
*
* @public
*/
declare function hasSubUnits<TAmount>(...[dineroObject]: HasSubUnitsParams<TAmount>): boolean;
//#endregion
//#region src/api/haveSameAmount.d.ts
/**
* Check whether a set of Dinero objects have the same amount.
*
* @param dineroObjects - The Dinero objects to compare.
*
* @returns Whether the Dinero objects have the same amount.
*
* @public
*/
declare function haveSameAmount<TAmount, TCurrency extends string>(...[dineroObjects]: HaveSameAmountParams<TAmount, TCurrency>): boolean;
//#endregion
//#region src/api/haveSameCurrency.d.ts
/**
* Check whether a set of Dinero objects have the same currency.
*
* @param dineroObjects - The Dinero objects to compare.
*
* @returns Whether the Dinero objects have the same currency.
*
* @public
*/
declare const haveSameCurrency: typeof haveSameCurrency$1;
//#endregion
//#region src/api/isNegative.d.ts
/**
* Check whether a Dinero object is negative.
*
* @param dineroObject - The Dinero object to check.
*
* @returns Whether the Dinero object is negative.
*
* @public
*/
declare function isNegative<TAmount>(...[dineroObject]: IsNegativeParams<TAmount>): boolean;
//#endregion
//#region src/api/isPositive.d.ts
/**
* Check whether a Dinero object is positive.
*
* @param dineroObject - The Dinero object to check.
*
* @returns Whether the Dinero object is positive.
*
* @public
*/
declare function isPositive<TAmount>(...[dineroObject]: IsPositiveParams<TAmount>): boolean;
//#endregion
//#region src/api/isZero.d.ts
/**
* Check whether the value of a Dinero object is zero.
*
* @param dineroObject - The Dinero object to check.
*
* @returns Whether the value of a Dinero object is zero.
*
* @public
*/
declare function isZero<TAmount>(...[dineroObject]: IsZeroParams<TAmount>): boolean;
//#endregion
//#region src/api/lessThan.d.ts
/**
* Check whether the value of a Dinero object is lesser than another.
*
* @param dineroObject - The Dinero object to compare.
* @param comparator - The Dinero object to compare to.
*
* @returns Whether the Dinero to compare is lesser than the other.
*
* @public
*/
declare function lessThan<TAmount, TCurrency extends string>(...[dineroObject, comparator]: LessThanParams<TAmount, TCurrency>): boolean;
//#endregion
//#region src/api/lessThanOrEqual.d.ts
/**
* Check whether the value of a Dinero object is lesser than or equal to another.
*
* @param dineroObject - The Dinero object to compare.
* @param comparator - The Dinero object to compare to.
*
* @returns Whether the Dinero to compare is lesser than or equal to the other.
*
* @public
*/
declare function lessThanOrEqual<TAmount, TCurrency extends string>(...[dineroObject, comparator]: LessThanOrEqualParams<TAmount, TCurrency>): boolean;
//#endregion
//#region src/api/maximum.d.ts
/**
* Get the greatest of the passed Dinero objects.
*
* @param dineroObjects - The Dinero objects to maximum.
*
* @returns A new Dinero object.
*
* @public
*/
declare function maximum<TAmount, TCurrency extends string>(...[dineroObjects]: MaximumParams<TAmount, TCurrency>): Dinero<TAmount, TCurrency>;
//#endregion
//#region src/api/minimum.d.ts
/**
* Get the lowest of the passed Dinero objects.
*
* @param dineroObjects - The Dinero objects to minimum.
*
* @returns A new Dinero object.
*
* @public
*/
declare function minimum<TAmount, TCurrency extends string>(...[dineroObjects]: MinimumParams<TAmount, TCurrency>): Dinero<TAmount, TCurrency>;
//#endregion
//#region src/api/multiply.d.ts
/**
* Multiply the passed Dinero object.
*
* @param multiplicand - The Dinero object to multiply.
* @param multiplier - The number to multiply with.
*
* @returns A new Dinero object.
*
* @public
*/
declare function multiply<TAmount, TCurrency extends string>(...[multiplicand, multiplier]: MultiplyParams<TAmount, TCurrency>): Dinero<TAmount, TCurrency>;
//#endregion
//#region src/api/normalizeScale.d.ts
/**
* Normalize a set of Dinero objects to the highest scale of the set.
*
* @param dineroObjects - The Dinero objects to normalize.
*
* @returns A new set of Dinero objects.
*
* @public
*/
declare function normalizeScale<TAmount, TCurrency extends string>(...[dineroObjects]: NormalizeScaleParams<TAmount, TCurrency>): Dinero<TAmount, TCurrency>[];
//#endregion
//#region src/api/subtract.d.ts
/**
* Subtract the passed Dinero objects.
*
* @param minuend - The Dinero object to subtract from.
* @param subtrahend - The Dinero object to subtract.
*
* @returns A new Dinero object.
*
* @public
*/
declare function subtract<TAmount, TCurrency extends string>(...[minuend, subtrahend]: SubtractParams<TAmount, TCurrency>): Dinero<TAmount, TCurrency>;
//#endregion
//#region src/api/toDecimal.d.ts
declare function toDecimal<TAmount, TCurrency extends string>(dineroObject: Dinero<TAmount, TCurrency>): string;
declare function toDecimal<TAmount, TOutput, TCurrency extends string>(dineroObject: Dinero<TAmount, TCurrency>, transformer: DineroTransformer<TAmount, TOutput, string, TCurrency>): TOutput;
//#endregion
//#region src/api/toSnapshot.d.ts
/**
* Get a snapshot of a Dinero object.
*
* @param dineroObject - The Dinero object to format.
* @param transformer - A transformer function.
*
* @returns A snapshot of the object.
*
* @public
*/
declare const toSnapshot: typeof toSnapshot$1;
//#endregion
//#region src/api/toUnits.d.ts
declare function toUnits<TAmount, TCurrency extends string>(dineroObject: Dinero<TAmount, TCurrency>): readonly TAmount[];
declare function toUnits<TAmount, TOutput, TCurrency extends string>(dineroObject: Dinero<TAmount, TCurrency>, transformer: DineroTransformer<TAmount, TOutput, readonly TAmount[], TCurrency>): TOutput;
//#endregion
//#region src/api/transformScale.d.ts
/**
* Transform a Dinero object to a new scale.
*
* @param dineroObject - The Dinero object to transform.
* @param newScale - The new scale.
* @param divide - A custom divide function.
*
* @returns A new Dinero object.
*
* @public
*/
declare function transformScale<TAmount, TCurrency extends string>(...[dineroObject, newScale, divide]: TransformScaleParams<TAmount, TCurrency>): Dinero<TAmount, TCurrency>;
//#endregion
//#region src/api/trimScale.d.ts
/**
* Trim a Dinero object's scale as much as possible, down to the currency exponent.
*
* @param dineroObject - The Dinero object which scale to trim.
*
* @returns A new Dinero object.
*
* @public
*/
declare function trimScale<TAmount, TCurrency extends string>(...[dineroObject]: TrimScaleParams<TAmount, TCurrency>): Dinero<TAmount, TCurrency>;
//#endregion
//#region src/dinero.d.ts
/**
* Create a Dinero object.
*
* @param options.amount - The amount in minor currency units.
* @param options.currency - The currency.
* @param options.scale - The number of decimal places to represent.
*
* @returns The created Dinero object.
*
* @public
*/
declare const dinero: <TCurrency extends string>({
amount,
currency: {
code,
base,
exponent
},
scale
}: DineroOptions<number, TCurrency>) => Dinero<number, TCurrency>;
//#endregion
export { halfOdd as A, DineroRate as B, convert as C, up as D, add as E, CreateDineroOptions as F, DineroSnapshot as G, DineroScaledAmount as H, createDinero as I, Dinero as J, DineroOptions as K, DineroUnaryOperation as L, halfDown as M, halfAwayFromZero as N, halfUp as O, down as P, DineroTransformer as R, equal as S, allocate as T, DineroFormatter as U, DineroRates as V, DineroDivideOperation as W, DineroComparisonOperator as X, DineroCalculator as Y, DineroBinaryOperation as Z, haveSameCurrency as _, toSnapshot as a, greaterThanOrEqual as b, normalizeScale as c, maximum as d, lessThanOrEqual as f, isNegative as g, isPositive as h, toUnits as i, halfEven as j, halfTowardsZero as k, multiply as l, isZero as m, trimScale as n, toDecimal as o, lessThan as p, DineroFactory as q, transformScale as r, subtract as s, dinero as t, minimum as u, haveSameAmount as v, compare as w, greaterThan as x, hasSubUnits as y, TransformerOptions as z };