UNPKG

fumadocs-core

Version:

The React.js library for building a documentation website

19 lines (18 loc) 533 B
//#region src/utils/remove-undefined.ts function removeUndefined(value, deep = false) { const obj = value; for (const key in obj) { if (obj[key] === void 0) delete obj[key]; if (!deep) continue; const entry = obj[key]; if (typeof entry === "object" && entry !== null) { removeUndefined(entry, deep); continue; } if (Array.isArray(entry)) for (const item of entry) removeUndefined(item, deep); } return value; } //#endregion export { removeUndefined as t }; //# sourceMappingURL=remove-undefined-Cfs4o_mM.js.map