source: imaps-frontend/node_modules/own-keys/index.js@ 79a0317

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
RevLine 
[79a0317]1'use strict';
2
3var GetIntrinsic = require('get-intrinsic');
4
5var safePushApply = require('safe-push-apply');
6
7var $ownKeys = GetIntrinsic('%Reflect.ownKeys%', true);
8var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
9var $gOPS = GetIntrinsic('%Object.getOwnPropertySymbols%', true);
10
11var keys = require('object-keys');
12
13/** @type {import('.')} */
14module.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.