0.0.1 • Published 4 years ago

serialize-structured-data v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Serialize Structured Data

Serialize and Deserialize structured data, following HTML 5 standard, in a compact and fast way, allowing binary data and serialization to binary.

GitHub license state npm

Primitive types
Boolean objects
String objects
Date
RegExp
Blob
File
FileList          serialize
ArrayBuffer      ----------→ string or binary(Buffer)
ArrayBufferView                     |
ImageBitmap                         | deserialize
ImageData                           ↓
Array                          original data
Object
Map
Set

HTML 5 Living Standard:

https://html.spec.whatwg.org/multipage/structured-data.html

MDN: The structured clone algorithm

https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm