Created
November 16, 2017 19:06
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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