Just a quick update on this: after some experimentation and further thought, I feel the way JSDB works currently is the right trade-off.
While it could run the constructor of persisted custom objects when loading them back in, that would impose a rigid authoring flow that would sacrifice ease of use for simple use cases. I find the latter more important in this case.
(I’m off to document this ‘feature’ now as it is currently undocumented and that’s not good.) :)
More: [https://codeberg.org/small-tech/jsdb/issues/12] … ⌘ Read more