Files
supabase/apps/studio/components/grid/utils/common.ts
Joshen Lim 27d9b44526 Consolidate copy to clipboard (#36353)
* Consolidate copy to clipboard

* Fix

* Fix some extra clipboard events.

* Fix the tests. Fix a small issue with the copy button.

* Fix

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-06-13 13:08:08 +02:00

8 lines
187 B
TypeScript

export function formatClipboardValue(value: any) {
if (!value) return ''
if (typeof value == 'object' || Array.isArray(value)) {
return JSON.stringify(value)
}
return value
}