import { isNullable } from "https://deno.land/x/isx@1.5.0/is_nullable.ts";
Whether the input is null
or undefined
or not.
Examples
Example 1
Example 1
import { isNullable } from "https://deno.land/x/isx@$VERSION/is_nullable.ts"
import { assertEquals } from "https://deno.land/std/testing/asserts.ts"
assertEquals(isNullable(null), true)
assertEquals(isNullable(undefined), true)
assertEquals(isNullable({}), false)