What is the difference between devalue and superjson?
Opened this issue · 1 comments
martinszeltins commented
I know this is not an "issue" but I don't understand what exactly is the difference between these 2 packages. Which is is better because they seem to do very similar things 😕
controversial commented
Functionality difference: superjson supports more types of values out of the box (e.g. classes, symbols, Errors, TypedArrays) that devalue doesn’t support
Safety difference: superjson ignores values it doesn’t support, silently excluding them from the output, whereas devalue throws an error. Erroring is probably better for type safety and predictable behavior, because you’ll be able to notice the error and add a custom replacer