typedoc-neo-theme
Version:
Improved theme for Typedoc
14 lines (13 loc) • 401 B
text/typescript
/**
* Converts a JSON input to a serialized string. This is useful for debugging.
*
* @param json The JSON object that should be updated.
* @return The serialized string.
*/
export function json(json: Object | string): string {
if (typeof json === 'string') {
console.warn('Warning - Type is string, not object:', json)
return json
}
return JSON.stringify(json)
}