Skip to content

Instantly share code, notes, and snippets.

@danlourenco
Last active March 8, 2019 04:38
Show Gist options
  • Save danlourenco/87c4be9c29d5458fe45579b09cf3316a to your computer and use it in GitHub Desktop.
Save danlourenco/87c4be9c29d5458fe45579b09cf3316a to your computer and use it in GitHub Desktop.
ES7 omit property via object rest operator
const myObject = {
a: 1,
b: 2,
c: 3
};
const { a, ...noA } = myObject;
console.log(noA); // => { b: 2, c: 3 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment