main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
583 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var GetIntrinsic = require('get-intrinsic');
|
---|
4 |
|
---|
5 | var safePushApply = require('safe-push-apply');
|
---|
6 |
|
---|
7 | var $ownKeys = GetIntrinsic('%Reflect.ownKeys%', true);
|
---|
8 | var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
|
---|
9 | var $gOPS = GetIntrinsic('%Object.getOwnPropertySymbols%', true);
|
---|
10 |
|
---|
11 | var keys = require('object-keys');
|
---|
12 |
|
---|
13 | /** @type {import('.')} */
|
---|
14 | module.exports = $ownKeys || function ownKeys(source) {
|
---|
15 | /** @type {(keyof typeof source)[]} */
|
---|
16 | var sourceKeys = ($gOPN || keys)(source);
|
---|
17 | if ($gOPS) {
|
---|
18 | safePushApply(sourceKeys, $gOPS(source));
|
---|
19 | }
|
---|
20 | return sourceKeys;
|
---|
21 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.