Skip to content

Instantly share code, notes, and snippets.

@renatorib
Created April 27, 2017 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renatorib/e1bc261a469841c85cbc2fd457abbb2c to your computer and use it in GitHub Desktop.
Save renatorib/e1bc261a469841c85cbc2fd457abbb2c to your computer and use it in GitHub Desktop.
toPairs
const toPairs = obj => Object.keys(obj).reduce((acc, value) => [ ...acc, [value, obj[value]] ], []);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment