@mintlify/common
Version:
Commonly shared code within Mintlify
13 lines (12 loc) • 352 B
JavaScript
/**
* Add "export " prefix to values that don't already start with "export"
* @param value the snippet content
* @returns the snippet content with the "export " prefix
*/
export const addExportPrefix = (value) => {
if (!value)
return undefined;
if (value.startsWith('export'))
return value;
return `export ${value}`;
};