UNPKG

lambda-live-debugger

Version:

Debug Lambda functions locally like it is running in the cloud

17 lines (16 loc) 310 B
/** * Remove undefined properties from an object * @param obj * @returns */ export function removeUndefinedProperties(obj) { if (!obj) { return obj; } for (const key in obj) { if (typeof obj[key] === 'undefined') { delete obj[key]; } } return obj; }