@melonproject/token-math
Version:
A small helper library to do precision safe calculations
16 lines (15 loc) • 659 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const greaterThan_1 = __importDefault(require("../bigInteger/greaterThan"));
const isQuantity_1 = __importDefault(require("../quantity/isQuantity"));
const greaterThan_2 = __importDefault(require("../quantity/greaterThan"));
const greaterThan = (a, b) => {
if (isQuantity_1.default(a) && isQuantity_1.default(b)) {
return greaterThan_2.default(a, b);
}
return greaterThan_1.default(a, b);
};
exports.default = greaterThan;