Last active
February 1, 2022 08:52
-
-
Save jssteinberg/3067dd21a2efe50e7859e3d03c6e313d to your computer and use it in GitHub Desktop.
Seems more FP to freeze the object returned from a factory function, but what's the drawbacks (how slow is it)?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const newObj = ({param=`paramDefault`}) => Object.freeze({ | |
param | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment