Skip to main content

isNull

Checks if a value is null or undefined.

Import

You can import the entire package and access the function:


_10
import * as sdk from "@onflow/sdk"
_10
_10
sdk.isNull(d)

Or import directly the specific function:


_10
import { isNull } from "@onflow/sdk"
_10
_10
isNull(d)

Usage


_10
import { isNull } from "@onflow/sdk"
_10
_10
console.log(isNull(null)); // true
_10
console.log(isNull(undefined)); // true
_10
console.log(isNull("")); // false
_10
console.log(isNull(0)); // false
_10
console.log(isNull(false)); // false

Parameters

d

  • Type: any
  • Description: The value to check

Returns

boolean


Rate this page