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