UNPKG

@techmely/utils

Version:

Collection of helpful JavaScript / TypeScript utils

13 lines (10 loc) 364 B
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 };