devalue icon indicating copy to clipboard operation
devalue copied to clipboard

Gets the job done when JSON.stringify can't

Results 25 devalue issues
Sort by recently updated
recently updated
newest added

This PR improves `stringify_string` performance. ### Description The ECMAScript spec specifies that `JSON.stringify` will escape `"`, `\\`, `\n`, `\r`, `\t`, `\b`, `\f`, and chars less than space. https://tc39.es/ecma262/multipage/structured-data.html#sec-quotejsonstring This is...

Hi, I'm using SvelteKit together with Prisma with [computed fields](https://www.prisma.io/docs/orm/prisma-client/queries/computed-fields). Results cannot be stringified and sent to the client (in `load` for example), because that throws this error: ``` Cannot...

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...

I wanted to use dynamic imports in revivers to make them more generic. However, the current implementation doesn't allow this because the parsed value would be a promise. This PR...

Trying to add some custom types for functions but `devalue` seems to throw before calling the replacer. I understand that serializing functions is a non-goal, but I'm not sure it...

When devaluing a Symbol with either `devalue.uneval` or `devalue.stringify`, the description string is printed as is instead of keeping it as a string. ```js devalue.uneval(Symbol("test")) // "Symbol(test)" devalue.uneval(Symbol("test\n")) // "Symbol(test...

This is something that tripped me up a couple times, and given that #26 is three years old, I'm likely not the only one. This PR adds support for `ArrayBuffer`...

Error message is slightly different, leaving this here as a heads up for anyone else trying to test their changes.

In the SvelteKit use case, it's annoying that sometimes my server side data models contain data that should not be sent to the client (like private keys or passwords as...

Ref: https://github.com/sveltejs/svelte.technology/issues/236 This might be something that would be nice. It would have avoided the above issue. If the goal is to produce javascript to re-create the same object, it'd...