Skip to content

Instantly share code, notes, and snippets.

@joelnet
Created March 1, 2019 07:30
Show Gist options
  • Save joelnet/66af920d05083b7e1dccdb3c6587f21e to your computer and use it in GitHub Desktop.
Save joelnet/66af920d05083b7e1dccdb3c6587f21e to your computer and use it in GitHub Desktop.
const setDefaults = ({ ...object}) => ({ quotes: [], ...object })
@joelnet
Copy link
Author

joelnet commented Mar 18, 2019

@b-dur
Copy link

b-dur commented Mar 19, 2019

I think you could skip the rest operation in parameters like so:
const setDefaults = (object) => ({ quotes: [], ...object })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment