@marketicons/markets
Version:
Market codes and names
17 lines (16 loc) • 846 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Exchange = exports.getAllMarkets = exports.getMarketInfo = exports.MarketData = void 0;
const bist_1 = __importDefault(require("./bist"));
const types_1 = require("./types");
Object.defineProperty(exports, "Exchange", { enumerable: true, get: function () { return types_1.Exchange; } });
exports.MarketData = {
[types_1.Exchange.BIST]: bist_1.default,
};
const getMarketInfo = (exchange, code) => Reflect.get(exports.MarketData[exchange], code) || undefined;
exports.getMarketInfo = getMarketInfo;
const getAllMarkets = (exchange) => Object.values(exports.MarketData[exchange]);
exports.getAllMarkets = getAllMarkets;