Skip to content

Commit fc97856

Browse files
committed
add comments
1 parent c79c3b2 commit fc97856

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/Json/Json.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ function isPrimitive(value: unknown): boolean {
4646
}
4747

4848
function CollapsedArray({ array }: {array: unknown[]}): ReactNode {
49+
// the character count is approximate, but it should be enough
50+
// to avoid showing too many entries
4951
const maxCharacterCount = 40
5052
const separator = ', '
5153

@@ -106,6 +108,8 @@ function JsonArray({ array, label }: { array: unknown[], label?: string }): Reac
106108
}
107109

108110
function CollapsedObject({ obj }: {obj: object}): ReactNode {
111+
// the character count is approximate, but it should be enough
112+
// to avoid showing too many entries
109113
const maxCharacterCount = 40
110114
const separator = ', '
111115
const kvSeparator = ': '

0 commit comments

Comments
 (0)