UNPKG

@melonproject/token-math

Version:

A small helper library to do precision safe calculations

16 lines (15 loc) 583 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const isZero_1 = __importDefault(require("../bigInteger/isZero")); const isQuantity_1 = __importDefault(require("../quantity/isQuantity")); const isZero_2 = __importDefault(require("../quantity/isZero")); const isZero = (a) => { if (isQuantity_1.default(a)) { return isZero_2.default(a); } return isZero_1.default(a); }; exports.default = isZero;