UNPKG

strike-axios

Version:
26 lines (25 loc) 975 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.tryToAnyCurrency = exports.tryToFiatCurrency = exports.isAnyCurrency = exports.isFiatCurrency = exports.ALL_CURRENCIES = exports.FIAT_CURRENCIES = void 0; exports.FIAT_CURRENCIES = ["USD", "EUR", "GBP"]; exports.ALL_CURRENCIES = [...exports.FIAT_CURRENCIES, "BTC", "USDT"]; const isFiatCurrency = (value) => { return exports.FIAT_CURRENCIES.indexOf(value) !== -1; }; exports.isFiatCurrency = isFiatCurrency; const isAnyCurrency = (value) => { return exports.ALL_CURRENCIES.indexOf(value) !== -1; }; exports.isAnyCurrency = isAnyCurrency; const tryToFiatCurrency = (value) => { if (exports.FIAT_CURRENCIES.indexOf(value) !== -1) { return value; } }; exports.tryToFiatCurrency = tryToFiatCurrency; const tryToAnyCurrency = (value) => { if (exports.ALL_CURRENCIES.indexOf(value) !== -1) { return value; } }; exports.tryToAnyCurrency = tryToAnyCurrency;