2020-08-25 23:57:08 +00:00
|
|
|
'use strict';
|
|
|
|
|
2022-11-10 10:43:16 +00:00
|
|
|
var RequireObjectCoercible = require('es-abstract/2022/RequireObjectCoercible');
|
2021-02-26 03:58:33 +00:00
|
|
|
var callBound = require('call-bind/callBound');
|
2020-08-25 23:57:08 +00:00
|
|
|
|
|
|
|
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
|
2022-11-10 10:43:16 +00:00
|
|
|
var $push = callBound('Array.prototype.push');
|
2020-08-25 23:57:08 +00:00
|
|
|
|
|
|
|
module.exports = function values(O) {
|
|
|
|
var obj = RequireObjectCoercible(O);
|
|
|
|
var vals = [];
|
|
|
|
for (var key in obj) {
|
2022-11-10 10:43:16 +00:00
|
|
|
if ($isEnumerable(obj, key)) { // checks own-ness as well
|
|
|
|
$push(vals, obj[key]);
|
2020-08-25 23:57:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return vals;
|
|
|
|
};
|