Skip to content

add deepCopyTranscoder

Harpo requested to merge hr/deep-copy-encoding into master

Persisting a Uint8Array will also persist the backing ArrayBuffer. In cases where a value comes over the network this results in each the entire network request is persisted. This behavior may be viewed in the chrome developer tools by inspecting the application/storage/indexedb/DB_NAME values. This PR adds a (already transient) dependency on level-transcoder and implements a custom deepCopyTranscoder which ensures Uint8Arrays are a more efficient size.

Merge request reports