Skip to content

Instantly share code, notes, and snippets.

@StevenACoffman
Last active December 14, 2018 02:25
Show Gist options
  • Save StevenACoffman/833d538d896eefd314e48c5d95f4f7aa to your computer and use it in GitHub Desktop.
Save StevenACoffman/833d538d896eefd314e48c5d95f4f7aa to your computer and use it in GitHub Desktop.
Rename object
renameProp = (oldProp, newProp, {[oldProp]:old, ...others}) => ({ [newProp]: old, ...others })
@StevenACoffman
Copy link
Author

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