IndexedDB supports JS objects as values in the IndexedDB via structured clone. Use this for better performance and debugging capabilities instead of serializing every document. Preliminary work has been done in the idbcloneval branch but this still yields some errors (possibly from level.js or abstract-leveldown or the custom patches to level.js Level/level-js#48).
WriteError: value cannot be an empty ArrayBuffer