main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
706 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var GetIntrinsic = require('get-intrinsic');
|
---|
4 |
|
---|
5 | var callBind = require('call-bind');
|
---|
6 | var callBound = require('call-bind/callBound');
|
---|
7 |
|
---|
8 | var $ownKeys = GetIntrinsic('%Reflect.ownKeys%', true);
|
---|
9 | var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%'));
|
---|
10 | var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true);
|
---|
11 | var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
|
---|
12 | var $gOPS = $SymbolValueOf ? GetIntrinsic('%Object.getOwnPropertySymbols%') : null;
|
---|
13 |
|
---|
14 | var keys = require('object-keys');
|
---|
15 |
|
---|
16 | module.exports = $ownKeys || function OwnPropertyKeys(source) {
|
---|
17 | var ownKeys = ($gOPN || keys)(source);
|
---|
18 | if ($gOPS) {
|
---|
19 | $pushApply(ownKeys, $gOPS(source));
|
---|
20 | }
|
---|
21 | return ownKeys;
|
---|
22 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.