devalue
devalue copied to clipboard
Gets the job done when JSON.stringify can't
Can the new line character appear in the serialized string? It doesn't seem to, but is it guaranteed? I'm asking this because I'm planning to use it with server-sent events.
I have a ServerSide JSON file that was encoded with devalue.stringify since it has Maps, doing a fetch call to it with .json doesn't work i.e consider ```js fetch("https://example.com/data.json") .then(res...
Are typed arrays and array buffers considered "non-POJOs" or could they be handled by this library as well?
Though `devalue.stringify()` appears to work on nested `Map`s correctly, `devalue.uneval()` does not handle the references correctly. From a setup like this: ```js import * as devalue from 'devalue'; const node1...
This PR exports `DevalueError`. Access to the error class is useful for type narrowing when access to `DevalueError`'s `path` property is needed. Also helpful if other errors might be thrown...
I know that this library already has basic typescript support, but it could be better. In two ways: 1. Right now, both `stringify` and `uneval` are typed as `(value: any)...
**Found duplicate:** https://github.com/sveltejs/kit/issues/6462 I get an error when trying to publish the latest sveltekit to netlify: `Error - No "exports" main defined in /var/task/node_modules/devalue/package.json` My Sveltekit project package.json: ``` "devDependencies":...
It took me way too long to figure out how to deserialize the string provided by the devalue(). It should be more explicit in the usage example.
Please take a look at this problem: https://github.com/sveltejs/sapper/issues/230 It would be great to be able ignore functions instead of throwing exception
Resolves https://github.com/Rich-Harris/devalue/issues/16 Removes use of Object.assign in favour of the second parameter of Object.create. This is supported by IE11. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#Using_propertiesObject_argument_with_Object.create() Also added a test for this case.