Blame view

天文台pc/tianwentai-ui/node_modules/recharts/lib/util/Global.js 678 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  "use strict";
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.Global = void 0;
  var parseIsSsrByDefault = function parseIsSsrByDefault() {
    return !(typeof window !== 'undefined' && window.document && window.document.createElement && window.setTimeout);
  };
  var Global = exports.Global = {
    isSsr: parseIsSsrByDefault(),
    get: function get(key) {
      return Global[key];
    },
    set: function set(key, value) {
      if (typeof key === 'string') {
        Global[key] = value;
      } else {
        var keys = Object.keys(key);
        if (keys && keys.length) {
          keys.forEach(function (k) {
            Global[k] = key[k];
          });
        }
      }
    }
  };