Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

object-get-own-property-names-external.js 864B

123456789101112131415161718192021222324
  1. 'use strict';
  2. /* eslint-disable es/no-object-getownpropertynames -- safe */
  3. var classof = require('../internals/classof-raw');
  4. var toIndexedObject = require('../internals/to-indexed-object');
  5. var $getOwnPropertyNames = require('../internals/object-get-own-property-names').f;
  6. var arraySlice = require('../internals/array-slice');
  7. var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  8. ? Object.getOwnPropertyNames(window) : [];
  9. var getWindowNames = function (it) {
  10. try {
  11. return $getOwnPropertyNames(it);
  12. } catch (error) {
  13. return arraySlice(windowNames);
  14. }
  15. };
  16. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  17. module.exports.f = function getOwnPropertyNames(it) {
  18. return windowNames && classof(it) === 'Window'
  19. ? getWindowNames(it)
  20. : $getOwnPropertyNames(toIndexedObject(it));
  21. };