UNPKG

@cosmos-kit/core

Version:

cosmos-kit wallet connector core package

15 lines (14 loc) 482 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.checkInit = checkInit; exports.checkKey = checkKey; function checkInit(target, targetName, msg) { if (target === undefined || target === null) { throw new Error(msg || `${targetName || 'Variable'} is not inited!`); } } function checkKey(target, key, targetName, msg) { if (!target.has(key)) { throw new Error(msg || `${key} not existed in Map ${targetName}!`); } }