Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/somefn/js/obj.ts>isEmpty

some functions for deno
Go to Latest
function isEmpty
import { isEmpty } from "https://deno.land/x/somefn@v0.17.3/js/obj.ts";

是否为空

  1. undefined, {}, {a:undefined}, [], [undefined] is empty.
  2. null, 0, '', 0n, false, {a:null}, [null] is not empty.
  3. 支持 Map 和 Set.

Parameters

obj: unknown