@techmely/utils
Version:
Collection of helpful JavaScript / TypeScript utils
24 lines (20 loc) • 451 B
JavaScript
/*!
* @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;
}
})();