Skip to main content
Module

x/unitest/deps.ts>isNil

🃏 Deno-first universal unit testing framework
Latest
function isNil
Re-export
import { isNil } from "https://deno.land/x/unitest@v1.0.0-beta.82/deps.ts";

Whatever argument is type of null or undefined not

Examples

Example 1

import { isNil } from './mod.ts'
isNil(null) // true
isNil(undefined) // true
isNil({}) // false

Parameters

value: unknown
  • Input any value

Returns

value is null | undefined

The result of value === null | typeof value === 'undefined'