Skip to main content
Module

x/polkadot/util/is/object.ts

Package publishing for deno.land/x/polkadot
Go to Latest
File

interface ObjectIndexed { // eslint-disable-next-line @typescript-eslint/no-explicit-any [index: string]: any;}
/** * @name isObject * @summary Tests for an `object`. * @description * Checks to see if the input value is a JavaScript object. * @example * <BR> * * ```javascript * import { isObject } from 'https://deno.land/x/polkadot@0.2.40/util/mod.ts'; * * isObject({}); // => true * isObject('something'); // => false * ``` */export function isObject <T extends ObjectIndexed = ObjectIndexed> (value?: unknown): value is T { return !!value && typeof value === 'object';}