UNPKG

@techmely/utils

Version:

Collection of helpful JavaScript / TypeScript utils

25 lines (19 loc) 455 B
'use strict'; /*! * @techmely/utils * Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com> * MIT Licensed */ // src/isUndefined.ts function isUndefined(val) { return typeof val === "undefined"; } // src/removeUndefinedObject.ts function removeUndefObj(obj) { const keys = Object.keys(obj); for (const key of keys) { isUndefined(obj[key]) ? obj[key] === void 0 : {}; } return obj; } exports.removeUndefObj = removeUndefObj;