Skip to content

Instantly share code, notes, and snippets.

@sammoore
Created November 16, 2017 19:06
Show Gist options
  • Save sammoore/2ce08d1fa29979a8d092e79d01ba4979 to your computer and use it in GitHub Desktop.
Save sammoore/2ce08d1fa29979a8d092e79d01ba4979 to your computer and use it in GitHub Desktop.
A good-enough version of Object.values for ES2015. For an ES7-compliant version that's more performant, supports polyfilling, and doesn't use `.map`, see github.com/es-shims/Object.values
'use strict';
const { keys } = Object;
module.exports = function values(object) {
return keys(object).map(k => object[k]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment