@tarojs/taro 2.2.19 → 2.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/taro.js CHANGED
@@ -4,35 +4,35 @@
4
4
  (factory((global.Taro = {})));
5
5
  }(this, (function (exports) { 'use strict';
6
6
 
7
- function ownKeys(object, enumerableOnly) {
8
- var keys = Object.keys(object);
7
+ function ownKeys(e, r) {
8
+ var t = Object.keys(e);
9
9
  if (Object.getOwnPropertySymbols) {
10
- var symbols = Object.getOwnPropertySymbols(object);
11
- enumerableOnly && (symbols = symbols.filter(function (sym) {
12
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
13
- })), keys.push.apply(keys, symbols);
14
- }
15
- return keys;
16
- }
17
- function _objectSpread2(target) {
18
- for (var i = 1; i < arguments.length; i++) {
19
- var source = null != arguments[i] ? arguments[i] : {};
20
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
21
- _defineProperty(target, key, source[key]);
22
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
23
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
10
+ var o = Object.getOwnPropertySymbols(e);
11
+ r && (o = o.filter(function (r) {
12
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
13
+ })), t.push.apply(t, o);
14
+ }
15
+ return t;
16
+ }
17
+ function _objectSpread2(e) {
18
+ for (var r = 1; r < arguments.length; r++) {
19
+ var t = null != arguments[r] ? arguments[r] : {};
20
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
21
+ _defineProperty(e, r, t[r]);
22
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
23
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
24
24
  });
25
25
  }
26
- return target;
26
+ return e;
27
27
  }
28
- function _typeof(obj) {
28
+ function _typeof(o) {
29
29
  "@babel/helpers - typeof";
30
30
 
31
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
32
- return typeof obj;
33
- } : function (obj) {
34
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
35
- }, _typeof(obj);
31
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
32
+ return typeof o;
33
+ } : function (o) {
34
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
35
+ }, _typeof(o);
36
36
  }
37
37
  function _classCallCheck(instance, Constructor) {
38
38
  if (!(instance instanceof Constructor)) {
@@ -45,7 +45,7 @@
45
45
  descriptor.enumerable = descriptor.enumerable || false;
46
46
  descriptor.configurable = true;
47
47
  if ("value" in descriptor) descriptor.writable = true;
48
- Object.defineProperty(target, descriptor.key, descriptor);
48
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
49
49
  }
50
50
  }
51
51
  function _createClass(Constructor, protoProps, staticProps) {
@@ -57,6 +57,7 @@
57
57
  return Constructor;
58
58
  }
59
59
  function _defineProperty(obj, key, value) {
60
+ key = _toPropertyKey(key);
60
61
  if (key in obj) {
61
62
  Object.defineProperty(obj, key, {
62
63
  value: value,
@@ -125,7 +126,11 @@
125
126
  return _construct.apply(null, arguments);
126
127
  }
127
128
  function _isNativeFunction(fn) {
128
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
129
+ try {
130
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
131
+ } catch (e) {
132
+ return typeof fn === "function";
133
+ }
129
134
  }
130
135
  function _wrapNativeSuper(Class) {
131
136
  var _cache = typeof Map === "function" ? new Map() : undefined;
@@ -206,6 +211,20 @@
206
211
  function _nonIterableSpread() {
207
212
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
208
213
  }
214
+ function _toPrimitive(input, hint) {
215
+ if (typeof input !== "object" || input === null) return input;
216
+ var prim = input[Symbol.toPrimitive];
217
+ if (prim !== undefined) {
218
+ var res = prim.call(input, hint || "default");
219
+ if (typeof res !== "object") return res;
220
+ throw new TypeError("@@toPrimitive must return a primitive value.");
221
+ }
222
+ return (hint === "string" ? String : Number)(input);
223
+ }
224
+ function _toPropertyKey(arg) {
225
+ var key = _toPrimitive(arg, "string");
226
+ return typeof key === "symbol" ? key : String(key);
227
+ }
209
228
 
210
229
  if (typeof Object.assign !== 'function') {
211
230
  // Must be writable: true, enumerable: false, configurable: true