Skip to content

Commit

Permalink
added bigint to formatters
Browse files Browse the repository at this point in the history
  • Loading branch information
cjreimer committed Nov 20, 2024
1 parent 66a0eda commit 9c4d477
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const jsonDisplay = (obj: unknown) => {
)
}

export const truncate = (value: string | number) => {
export const truncate = (value: string | number | bigint) => {
let output = value?.toString() ?? ''

if (output.length > MAX_STRING_LENGTH) {
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/test-project/web/src/lib/formatters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const jsonDisplay = (obj: unknown) => {
)
}

export const truncate = (value: string | number) => {
export const truncate = (value: string | number | bigint) => {
let output = value?.toString() ?? ''

if (output.length > MAX_STRING_LENGTH) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const jsonDisplay = (obj: unknown) => {
)
}

export const truncate = (value: string | number) => {
export const truncate = (value: string | number | bigint) => {
let output = value?.toString() ?? ''

if (output.length > MAX_STRING_LENGTH) {
Expand Down

0 comments on commit 9c4d477

Please sign in to comment.