Skip to content

Instantly share code, notes, and snippets.

@emilong
Created October 13, 2016 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save emilong/bcb94171cbf25d286ac6bcb3f8c4b6bb to your computer and use it in GitHub Desktop.
Save emilong/bcb94171cbf25d286ac6bcb3f8c4b6bb to your computer and use it in GitHub Desktop.
// simple renaming to avoid collisions or just as a preference.
const a = 5;
const { a: b } = { a: 3 };
console.log(b); // prints 3
// rename for another API and use enhanced object literal notation.
function verifyUser({ userId: id }) {
return User.update({ id, verified: true });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment