isNull
Checks if a value is null or undefined.
Import
You can import the entire package and access the function:
_10import * as sdk from "@onflow/sdk"_10_10sdk.isNull(d)
Or import directly the specific function:
_10import { isNull } from "@onflow/sdk"_10_10isNull(d)
Usage
_10import { isNull } from "@onflow/sdk"_10_10console.log(isNull(null)); // true_10console.log(isNull(undefined)); // true_10console.log(isNull("")); // false_10console.log(isNull(0)); // false_10console.log(isNull(false)); // false
Parameters
d
- Type:
any
- Description: The value to check
Returns
boolean