.values is unsupported in many browsers - you can use .map to get an array of all the values:

var vals = Object.keys(countries).map(function(key) {
    return countries[key];
});

See MDN doc: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values or Official doc: https://tc39.github.io/ecma262/#sec-object.values (thanks @evolutionxbox for correction)

Answer from tymeJV on Stack Overflow
🌐
Edureka Community
edureka.co › home › community › categories › web development › node-js › error typeerror object values is not a function
Error TypeError Object values is not a function | Edureka Community
October 15, 2020 - Object.values() received following error: TypeError: Object.values is not a function. I have seen ... .js it seems so intuitive like Object.keys()?
Discussions

node.js - Uncaught TypeError: Object.values is not a function - Stack Overflow
Okay so, I npm run build my application, drag the build files into tizon studio. Run the application... I get the error: 2.bd938b3f.chunk.js:79798 Uncaught TypeError: Object.values is not a funct... More on stackoverflow.com
🌐 stackoverflow.com
January 15, 2020
"TypeError: Object.values is not a function" on Node 6
Bug package version: 0.8.0 node version: 6.14.3 (LTS, end-of-life April 2019) npm (or yarn) version: 0.33.11 Relevant code or config require('jest-extended'); What you did: Require jest-ext... More on github.com
🌐 github.com
3
July 30, 2018
TypeError: Object.values is not a function
My tests works fine on Jest 19.0.0, but it breaks when I upgrade to Jest 20.0.4 with the following error: TypeError: Object.values is not a function this is my .babelrc: { "presets": ["flow", "es20... More on github.com
🌐 github.com
13
May 30, 2017
node.js - Object.values is not a function error - Stack Overflow
I am creating a discord bot just to mess around with it and I am using express to create a website to control it. But I keep getting 'Object.values is not a function' when transferring to another p... More on stackoverflow.com
🌐 stackoverflow.com
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Object › values
Object.values() - JavaScript - MDN Web Docs
6 days ago - The Object.values() static method returns an array of a given object's own enumerable string-keyed property values.
🌐
GitHub
github.com › jest-community › jest-extended › issues › 150
"TypeError: Object.values is not a function" on Node 6 · Issue #150 · jest-community/jest-extended · GitHub
July 30, 2018 - FAIL src/index.spec.js ● Test suite failed to run TypeError: Object.values is not a function at Object.<anonymous> (node_modules/jest-extended/dist/matchers/index.js:269:26) at Object.<anonymous> (node_modules/jest-extended/dist/index.js:3:17) Reactions are currently unavailable ·
Author: jest-community
🌐
GitHub
github.com › jestjs › jest › issues › 3687
TypeError: Object.values is not a function · Issue #3687 · jestjs/jest · GitHub
May 30, 2017 - TypeError: Object.values is not a function#3687 · Copy link · sibelius · opened · on May 30, 2017 · Issue body actions · My tests works fine on Jest 19.0.0, but it breaks when I upgrade to Jest 20.0.4 with the following error: TypeError: Object.values is not a function ·
Author: jestjs
🌐
Dirask
dirask.com › questions › JavaScript-Uncaught-TypeError-Object-values-is-not-a-function-10Ge0j
❤ 💻 JavaScript - Uncaught TypeError: Object.values is not a function - Dirask
The values() method is not supported in many browsers (or some older versions). You can use map() method to get an array of values. Practical example: // ONLINE-RUNNER:browser; var letters = { A: 1, B: 2, C: 3, }; var values = Object.keys(l...
Find elsewhere
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Errors › Not_a_function
TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value is not actually a function.
🌐
W3Schools
w3schools.com › jsref › jsref_object_values.asp
JavaScript Object.values() Method
The Object.values() method returns an array of the property values of an object.
🌐
Mastering JS
masteringjs.io › tutorials › fundamentals › object-values
How to Use JavaScript's Object.values() Function - Mastering JS
Object.values() is like Object.keys(), except it returns an array containing all the object's values, instead of the object's keys.
🌐
Medium
medium.com › @contact_85142 › how-to-fix-uncaught-typeerror-object-is-not-a-function-1e3082307f1f
How to fix: Uncaught TypeError: object is not a function | by FailWarn | Medium
January 16, 2025 - The error message Uncaught TypeError: object is not a function indicates that the code is trying to call a method or property as a function, but the value being referenced isn't a function.
🌐
GitHub
github.com › bettiolo › babel-preset-es2017 › issues › 37
TypeError Object.values is not a function · Issue #37 · bettiolo/babel-preset-es2017 · GitHub
June 16, 2016 - Perhaps this is just a configuration issue, but when I try to use this preset to transpile a call to Object.values so I can use it in the browser I get Object.values is not a function. Looks like it's not installing a shim. my original ....
Author: bettiolo
🌐
Reddit
reddit.com › r/reactjs › typeerror: object(...) is not a function
r/reactjs on Reddit: TypeError: Object(...) is not a function
August 10, 2021 -

Hello,

While working in React I made an ES6 arrow function. When I saved my work and the app automatically reloaded in Chrome, I got a gray screen with the following message:

TypeError: Object(...) is not a function

When I converted the arrow function to an ES5 function, the error did not appear anymore. For example if I would have something similar to this it would error out:

const setLocale = (locale) => {

localStorage.setItem('locale', locale);

}

But if I had the function like this, no error would be thrown:

function setLocale (locale) {

localStorage.setItem('locale', locale);

}

Is there a particular reason why arrow functions cause these errors in React, but ES5 functions do not? I have tried Googling this issue, but was not able to find an answer.

Any help is appreciated.

Thanks

🌐
GitHub
github.com › ant-design › ant-design › issues › 34298
TypeError: Object.values is not a function · Issue #34298 · ant-design/ant-design · GitHub
March 4, 2022 - I have searched the issues of this repository and believe that this is not a duplicate. ... 未对Object.values做polyfill,导致在低版本浏览器中页面报错 代码位置:webpack:///node_modules/antd/lib/form/FormItem.js in values at line 210:11
Author: ant-design
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 115000539324-TypeError-Object-entries-is-not-a-function
TypeError: Object.entries is not a function – IDEs Support (IntelliJ Platform) | JetBrains
August 25, 2017 - console.log(Object.values(obj)); 3 comments · Sort by Date Votes · Elena Pogorelova · Created August 25, 2017 19:23 · What Node.js version do you use? See https://stackoverflow.com/questions/43858714/typeerror-object-entries-is-not-a-function · Permanently deleted user ·
🌐
DEV Community
dev.to › lavary › about-typeerror-map-is-not-a-function-in-javascript-80
About "TypeError: map is not a function" in JavaScript - DEV Community
February 6, 2023 - The above code raises the "TypeError: object. map is not a function" error because the calling object isn't an array - it's an object literal.
🌐
JavaScript.info
javascript.info › tutorial › the javascript language › data types
Object.keys, values, entries
And we still can call Object.values(data) on it. The second difference is that Object.* methods return “real” array objects, not just an iterable.