You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have feature parity with JSON.stringify.
My particular usecase is regarding SvelteKit: I'm engineering a pinia-like global store that works no matter the context (layout/page load in browser/ssr, or component initialization during browser/ssr), and so I store some writable stores in the session. The issue of course being that I don't want multiple users accessing the same shared stores during ssr.
I can achieve what I want by using Object.defineProperty with non-enumerable, regardless a toJSON api would be nice.
Other
If the feature is approved, I can do the PR.
The text was updated successfully, but these errors were encountered:
Feature request
Make it so that if an object as a
.toJSON()
function, devalue runs on the result of that function: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#tojson_behaviorWhy
It would be nice to have feature parity with
JSON.stringify
.My particular usecase is regarding SvelteKit: I'm engineering a pinia-like global store that works no matter the context (layout/page load in browser/ssr, or component initialization during browser/ssr), and so I store some writable stores in the session. The issue of course being that I don't want multiple users accessing the same shared stores during ssr.
I can achieve what I want by using
Object.defineProperty
withnon-enumerable
, regardless atoJSON
api would be nice.Other
If the feature is approved, I can do the PR.
The text was updated successfully, but these errors were encountered: