{"version":3,"file":"dropTopLevelUndefinedKeys.mjs","sources":["../../../src/utils/dropTopLevelUndefinedKeys.ts"],"sourcesContent":["\n/**\n * In contrast to the regular `dropUndefinedKeys` method,\n * this one does not deep-drop keys, but only on the top level.\n */\nexport function dropTopLevelUndefinedKeys<T extends object>(obj: T): Partial<T> {\n  const mutatedObj: Partial<T> = {};\n\n  for (const k of Object.getOwnPropertyNames(obj)) {\n    const key = k as keyof T;\n    if (obj[key] !== undefined) {\n      mutatedObj[key] = obj[key];\n    }\n  }\n\n  return mutatedObj;\n}\n"],"names":[],"mappings":"AACA;;;AAGG;AACG,SAAU,yBAAyB,CAAmB,GAAM,EAAA;IAChE,MAAM,UAAU,GAAe,EAAE;IAEjC,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE;QAC/C,MAAM,GAAG,GAAG,CAAY;AACxB,QAAA,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;YAC1B,UAAU,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC;AAC3B;AACF;AAED,IAAA,OAAO,UAAU;AACnB;;;;"}