JSPM

  • Created
  • Published
  • Downloads 4442268
  • Score
    100M100P100Q242795F
  • License MIT

Package Exports

  • superjson

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (superjson) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

superjson

Safely work with dates, bigints, and more with this superset of JSON.

npm Language grade: JavaScript CI

Backstory

...

Key features

  • 🍱 Reliable serialization and deserialization
  • 🔐 Type safety with autocompletion
  • 🐾 Negligible runtime footprint
  • 💫 Framework agnostic

Example

const input = {
  normal: 'string',
  timestamp: new Date(),
};

const { json, meta } = serialize(input);

/*
json = {
  normal: 'string',
  timestamp: "2020-06-20T04:56:50.293Z",
}

meta = {
  timestamp: 'Date',
}
*/