UNPKG

@techmely/utils

Version:

Collection of helpful JavaScript / TypeScript utils

28 lines (23 loc) 482 B
/*! * @techmely/utils * Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com> * MIT Licensed */ import { isNotNull } from "./chunk-MCZYMIGI.mjs"; import { isNotEmpty } from "./chunk-YZ4U7P47.mjs"; import { isDefined } from "./chunk-WTO2SOQI.mjs"; // src/removeEmptyObjec.ts function removeEmptyObj(obj) { return Object.fromEntries( Object.entries(obj).filter(([_, v]) => isNotNull(v) && isDefined(v) && isNotEmpty(v)) ); } export { removeEmptyObj };