UNPKG

@daiso-tech/core

Version:

The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.

33 lines 690 B
/** * @module Utilities */ /** * @internal */ export function objectSize( // eslint-disable-next-line @typescript-eslint/no-explicit-any object) { let size = 0; for (const key in object) { if (object[key] === undefined) { continue; } size++; } return size; } /** * @internal */ export function isObjectEmpty( // eslint-disable-next-line @typescript-eslint/no-explicit-any object) { return objectSize(object) === 0; } /** * @internal */ export function removeUndefinedProperties(object) { return Object.fromEntries(Object.entries(object).filter(([_key, value]) => value !== undefined)); } //# sourceMappingURL=object.js.map