kiliman / remix-typedjson

This package is a replacement for superjson to use in your Remix app. It handles a subset of types that `superjson` supports, but is faster and smaller.
MIT License
435 stars 19 forks source link

add support for decimal #29

Closed brianbolnick closed 1 year ago

brianbolnick commented 1 year ago

This PR adds support for the Decimal datatype.

I followed the same approach as the contribution to superjson to just call toJSON for serialization.

Also removed a rogue .only on the typed tests so they all run.

Let me know if there's anything you want changed :)

socket-security[bot] commented 1 year ago

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
decimal.js 10.4.3 None +0 283 kB mikemcl
kiliman commented 1 year ago

Thanks for the PR, but the main point of this package is its small size. That decimal.js package is huge.

I'm adding an API to support custom types. See #30 for details.