ut2 1.4.7 → 1.4.8

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/ut2.js CHANGED
@@ -11,13 +11,16 @@
11
11
  var objectProto = Object.prototype;
12
12
  var objectToString = objectProto.toString;
13
13
  var objectGetOwnPropertySymbols = Object.getOwnPropertySymbols;
14
+ var objectGetPrototypeOf = Object.getPrototypeOf;
15
+ var objectKeys = Object.keys;
14
16
  var hasOwnProperty = objectProto.hasOwnProperty;
15
17
  var propertyIsEnumerable = objectProto.propertyIsEnumerable;
16
18
  var functionToString = Function.prototype.toString;
17
- var symbolProto = Symbol ? Symbol.prototype : undefined;
18
- var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
19
+ var symbolExisted = typeof Symbol !== 'undefined';
20
+ var symbolProto = symbolExisted ? Symbol.prototype : undefined;
21
+ var symToStringTag = symbolExisted ? Symbol.toStringTag : undefined;
19
22
  var arrayProto = Array.prototype;
20
- var arrSlice = Array.prototype.slice;
23
+ var arrSlice = arrayProto.slice;
21
24
  var arrayAt = arrayProto.at;
22
25
  var numberIsFinite = Number.isFinite;
23
26
  var numberIsInteger = Number.isInteger;
@@ -472,7 +475,7 @@
472
475
  return value == null || value !== value ? defaultValue : value;
473
476
  }
474
477
 
475
- var VERSION = "1.4.7";
478
+ var VERSION = "1.4.8";
476
479
  var supportedArgumentsType = objectToString.call((function () { return arguments; })()) === argumentsTag;
477
480
  var FUNC_ERROR_TEXT = 'Expected a function';
478
481
  function toSource(func) {
@@ -711,8 +714,11 @@
711
714
  }
712
715
 
713
716
  function isBuffer(value) {
714
- if (typeof Buffer === 'function' && typeof Buffer.isBuffer === 'function') {
715
- return Buffer.isBuffer(value);
717
+ if (typeof Buffer === 'function') {
718
+ var isBuffer_1 = Buffer.isBuffer;
719
+ if (typeof isBuffer_1 === 'function') {
720
+ return isBuffer_1(value);
721
+ }
716
722
  }
717
723
  return false;
718
724
  }
@@ -794,7 +800,7 @@
794
800
  if (!isObjectLike(value) || getTag(value) !== objectTag) {
795
801
  return false;
796
802
  }
797
- var proto = Object.getPrototypeOf(Object(value));
803
+ var proto = objectGetPrototypeOf(Object(value));
798
804
  if (proto === null) {
799
805
  return true;
800
806
  }
@@ -817,7 +823,7 @@
817
823
 
818
824
  function keys(value) {
819
825
  if (!isPrototype(value)) {
820
- return Object.keys(value);
826
+ return objectKeys(value);
821
827
  }
822
828
  var result = [];
823
829
  for (var key in Object(value)) {
@@ -866,7 +872,7 @@
866
872
  if (!isObject(object)) {
867
873
  return [];
868
874
  }
869
- return Object.keys(object).concat(getSymbols(object));
875
+ return objectKeys(object).concat(getSymbols(object));
870
876
  }
871
877
 
872
878
  function isNil(value) {
@@ -1328,7 +1334,7 @@
1328
1334
  result.push(item);
1329
1335
  }
1330
1336
  });
1331
- o = Object.getPrototypeOf(o);
1337
+ o = objectGetPrototypeOf(o);
1332
1338
  }
1333
1339
  return result;
1334
1340
  }