Aral Balkan · @aral
34612 followers · 24930 posts · Server mastodon.ar.al

An interesting JavaScript Database (JSDB) edge case I just encountered:

If you’re persisting custom objects, please do NOT use setter methods (`set something () {…}`).

Use regular methods instead (`setSomething () {…}`) for predictable behaviour that likely matches your conceptual model of how things should work.

(This is due to how setters interact with proxies.)

Details: codeberg.org/small-tech/jsdb#c

#JavaScriptDatabase #javascript #database #jsdb #accessors #smalltech #SmallWeb #web #dev

Last updated 1 year ago