2020-08-25 23:57:08 +00:00
|
|
|
'use strict';
|
|
|
|
|
2021-02-26 03:58:33 +00:00
|
|
|
var GetIntrinsic = require('get-intrinsic');
|
2020-08-25 23:57:08 +00:00
|
|
|
|
2021-02-26 03:58:33 +00:00
|
|
|
var callBind = require('call-bind');
|
|
|
|
var callBound = require('call-bind/callBound');
|
2020-08-25 23:57:08 +00:00
|
|
|
|
|
|
|
var $ownKeys = GetIntrinsic('%Reflect.ownKeys%', true);
|
|
|
|
var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%'));
|
|
|
|
var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true);
|
|
|
|
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
|
|
|
|
var $gOPS = $SymbolValueOf ? GetIntrinsic('%Object.getOwnPropertySymbols%') : null;
|
|
|
|
|
|
|
|
var keys = require('object-keys');
|
|
|
|
|
|
|
|
module.exports = $ownKeys || function OwnPropertyKeys(source) {
|
|
|
|
var ownKeys = ($gOPN || keys)(source);
|
|
|
|
if ($gOPS) {
|
|
|
|
$pushApply(ownKeys, $gOPS(source));
|
|
|
|
}
|
|
|
|
return ownKeys;
|
|
|
|
};
|