#accessors

2023-05-06

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

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst