```ts const date = devalue.stringify(value, { Numeric: (value) => value instanceof Numeric && value.toJSON(), }); ``` If `Numeric#toJSON()` returns `0`, there’ll be a `DevalueError: Cannot stringify arbitrary non-POJOs` error. Code: https://github.com/sveltejs/devalue/blob/6f4eb8b82881a2487757625f8c2a57281b02e3fa/src/stringify.js#L64