1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-14 03:30:18 +00:00
musix-oss/node_modules/es-abstract/helpers/OwnPropertyKeys.js

22 lines
633 B
JavaScript
Raw Normal View History

2020-03-03 20:30:50 +00:00
'use strict';
var GetIntrinsic = require('../GetIntrinsic');
var callBind = require('./callBind');
var callBound = require('./callBound');
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 = function OwnPropertyKeys(source) {
var ownKeys = ($gOPN || keys)(source);
if ($gOPS) {
$pushApply(ownKeys, $gOPS(source));
}
return ownKeys;
};