aral, Assign properties in a constructor’s parameter object (with defaults) to object being instantiated in JavaScript
This is a little something I ended up playing around with this morning before figuring out how to do it (after spending far too much time down a rabbit hole with object destructuring when what I really needed was creative use of the spread operator).
(Useful for custom objects in JSDB 5 – https://codeberg.org/small-tech/jsdb#custom-data-types)
Add comment