Skip to main content

Module: utils

Type Aliases

Primitive

Ƭ Primitive: string | number | bigint | boolean | symbol | null | undefined

Defined in

utils.ts:1

Functions

isHTMLElement

isHTMLElement(element): element is HTMLElement

Checks whether the element passed is a HTMLElement.

Parameters

NameTypeDescription
elementunknownThe element to check.

Returns

element is HTMLElement

true if element is an instance of HTMLElement

Defined in

utils.ts:30


isPrimitive

isPrimitive(primitive): primitive is Primitive

Checks whether the primitive passed is of a primitive type.

Parameters

NameTypeDescription
primitiveunknownThe value to check.

Returns

primitive is Primitive

true if primitive is of any primitive type.

Defined in

utils.ts:8


isText

isText(element): element is Text

Checks whether the element passed is a Text.

Parameters

NameTypeDescription
elementunknownThe element to check.

Returns

element is Text

true is element is an instance of Text

Defined in

utils.ts:39


notNullish

notNullish<T>(object): object is NonNullable<T>

Checks whether the object passed is nullish i.e., null or undefined.

Type parameters

Name
T

Parameters

NameTypeDescription
objectTThe object to check.

Returns

object is NonNullable<T>

true if object is not nullish.

Defined in

utils.ts:21