12 lines
189 B
JavaScript
12 lines
189 B
JavaScript
|
function removeUndefinedProperties(obj) {
|
||
|
for (const key in obj) {
|
||
|
if (obj[key] === void 0) {
|
||
|
delete obj[key];
|
||
|
}
|
||
|
}
|
||
|
return obj;
|
||
|
}
|
||
|
export {
|
||
|
removeUndefinedProperties
|
||
|
};
|