UNPKG

734 BJavaScriptView Raw
1'use strict';
2var getBuiltIn = require('../internals/get-built-in');
3var uncurryThis = require('../internals/function-uncurry-this');
4var getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');
5var getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');
6var anObject = require('../internals/an-object');
7
8var concat = uncurryThis([].concat);
9
10// all object keys, includes non-enumerable and symbols
11module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
12 var keys = getOwnPropertyNamesModule.f(anObject(it));
13 var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
14 return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
15};