UNPKG

@melonproject/token-math

Version:

A small helper library to do precision safe calculations

9 lines (8 loc) 460 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const toFixed_1 = __importDefault(require("../quantity/toFixed")); const display = (price) => `${toFixed_1.default(price.base)}${price.base.token.symbol}/${toFixed_1.default(price.quote)}${price.quote.token.symbol}`; exports.default = display;