import { stringify } from "yaml";
//#region src/v2/features/collection/components/Editor/helpers/stringify-document.ts
/**
* Stringifies a JavaScript object/document into a formatted string.
* Uses YAML format if language is 'yaml', otherwise uses JSON.
*
* @param document - The JavaScript object to stringify
* @param language - Output language, expected to be either 'json' or 'yaml'
* @returns The stringified document in the specified language
*/
var stringifyDocument = (document, language) => {
	if (language === "yaml") return stringify(document, { indent: 2 });
	return JSON.stringify(document, null, 2);
};
//#endregion
export { stringifyDocument };

//# sourceMappingURL=stringify-document.js.map