//#region src/utils/ensureMongoDocumentToObject.ts
/**
* If the dictionary is a mongoose document, convert it to an object
* @param potentialDocument - The potential document to convert.
* @returns The potential document converted to an object.
*/
const ensureMongoDocumentToObject = (potentialDocument) => {
	let potentialObject = potentialDocument;
	if (typeof potentialDocument.toObject === "function") potentialObject = potentialDocument.toObject();
	return potentialObject;
};

//#endregion
export { ensureMongoDocumentToObject };
//# sourceMappingURL=ensureMongoDocumentToObject.mjs.map