Skip to content

Instantly share code, notes, and snippets.

Created Jun 4, 2013
What would you like to do?
// why doesn't this exist?
if (!Object.values) {
Object.values = function(obj) {
var i, ret = [];
for (i in obj) {
return ret;
var o = {
foo: "foo value",
bar: "bar value"
Object.keys(o); // ["foo","bar"]
Object.values(o); // ["foo value","bar value"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment