1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/object.values/implementation.js

19 lines
491 B
JavaScript
Raw Permalink Normal View History

2023-12-18 13:12:25 +08:00
'use strict';
2023-12-28 23:41:32 +08:00
var RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');
var callBound = require('call-bind/callBound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var $push = callBound('Array.prototype.push');
2023-12-18 13:12:25 +08:00
module.exports = function values(O) {
2023-12-28 23:41:32 +08:00
var obj = RequireObjectCoercible(O);
2023-12-18 13:12:25 +08:00
var vals = [];
for (var key in obj) {
2023-12-28 23:41:32 +08:00
if ($isEnumerable(obj, key)) { // checks own-ness as well
$push(vals, obj[key]);
2023-12-18 13:12:25 +08:00
}
}
return vals;
};