UNPKG

@polkadot/util

Version:
11 lines (10 loc) 432 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isCodec = void 0; const helpers_js_1 = require("./helpers.js"); const checkCodec = /*#__PURE__*/ (0, helpers_js_1.isOnObject)('toHex', 'toHuman', 'toU8a'); const checkRegistry = /*#__PURE__*/ (0, helpers_js_1.isOnObject)('get'); function isCodec(value) { return checkCodec(value) && checkRegistry(value.registry); } exports.isCodec = isCodec;