We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20910eb commit 0f774f4Copy full SHA for 0f774f4
src/index.ts
@@ -64,6 +64,7 @@ export default function removeUndefinedObjects<T>(obj?: T): T | undefined {
64
65
// JSON.stringify removes undefined values. Though `[undefined]` will be converted with this to
66
// `[null]`, we'll clean that up next.
67
+ // eslint-disable-next-line try-catch-failsafe/json-parse
68
let withoutUndefined = JSON.parse(JSON.stringify(obj));
69
70
// Then we recursively remove all empty objects and nullish arrays.
0 commit comments