Svelte <Inspect {value} />

Custom Components beta

svelte-inspect-value aims to (eventually) export all the building blocks to extend the component with custom components.

Better documentation soon! Here's a minimal example:

Custom line

+page.svelte
...
Result
numbersAndColors
:
obj
7 entries
oneBillion
:
num 1000000000
oneTwoThreeFourEtc
:
num 1234567890
maxSafe
:
num 9007199254740991
red
:
pink
:
yella
:
notAColor
:
str 'hello'
5 chars

Custom expandable

*Custom expandables API is still unfinished
num 2
multiples:
  • base: 2
  • timesTwo: 4
  • timesThree: 6

Error handling

If any component, built-in or custom, should throw an error it will be caught by a boundary on an entry-per-entry basis and render error details.
The error value display component reverts to using default components to avoid further issues.

customString
:
obj
2 entries
'clickToError'
:
str click me
hey
:
str dont click me i will error