sylvainpolletvillard / ObjectModel

Strong Dynamically Typed Object Modeling for JavaScript
http://objectmodel.js.org
MIT License
467 stars 30 forks source link

babel config to get classes working #114

Closed gotjoshua closed 5 years ago

gotjoshua commented 5 years ago

and default Mother to female and change Mrs to Mama as not all mothers are married.

gotjoshua commented 5 years ago

I didn't know how to separate/revert the changes into different commits from codesandbox, therefore the changes to class-extends are in the same commit.

Also curious if that is a legit way to set defaults (via a constructor parameter deconstruction)...

sylvainpolletvillard commented 5 years ago

Thanks ! Didn't know "Mrs" was only used for married women, English is not my first language.

Yes, you can use default values for constructor parameters as an alternative way to apply defaults. Actually, the changes in v4 regarding default assignments are mainly due to the fact that developers are more used to apply defaults this way compared to prototypal inheritance.