Search
Items tagged with: parameterObject
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)
#JavaScript #parameterObject #defaults #JSDB
gists/assign-properties-in-a-constructors-parameter-object-with-defaults-to-object-being-instantiated-in-JavaScript.md at main
gists - A place for me to post and share small, self-contained code snippets.Codeberg.org