devalue icon indicating copy to clipboard operation
devalue copied to clipboard

ignore the functions

Open tevel opened this issue 6 years ago • 3 comments

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

tevel avatar Apr 07 '18 09:04 tevel

@Rich-Harris do u consider option to ignore functions/symbols and throw warning instead of error or its wont be in this lib by design?

aldarund avatar Sep 29 '18 14:09 aldarund

It's by design. For the use case that this library is intended for, there's no point in serializing values with less than 100% fidelity

Rich-Harris avatar Sep 29 '18 14:09 Rich-Harris

@tevel you can do:

Object.defineProperty(store, "t", {enumerable: false, configurable: true, value: t});

It won't be transferred.

coyotte508 avatar Dec 11 '21 10:12 coyotte508