You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use JSON.stringify and JSON.parse, any function references existing in source object will not remain in the output object. If that was the original intention, I'd suggest adding unit tests with a few cases which would document the correct behavior. If not, then I'd use Object.assign:
If you use
JSON.stringify
andJSON.parse
, any function references existing in source object will not remain in the output object. If that was the original intention, I'd suggest adding unit tests with a few cases which would document the correct behavior. If not, then I'd useObject.assign
:If IE support is needed, instead of that line of code I'd use the polyfill presented here.
The text was updated successfully, but these errors were encountered: