ut2 1.4.10 → 1.5.1

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.
Files changed (73) hide show
  1. package/README.md +6 -0
  2. package/dist/ut2.js +75 -71
  3. package/dist/ut2.js.map +1 -1
  4. package/dist/ut2.min.js +1 -1
  5. package/dist/ut2.min.js.map +1 -1
  6. package/es/chunk.js +2 -1
  7. package/es/inRange.js +2 -1
  8. package/es/internals/decimalAdjust.js +2 -1
  9. package/es/internals/getSymbols.js +2 -2
  10. package/es/internals/getTag.js +8 -8
  11. package/es/internals/getTagWithBugfix.js +6 -6
  12. package/es/internals/helpers.js +4 -4
  13. package/es/internals/keys.js +2 -2
  14. package/es/internals/native.js +15 -8
  15. package/es/internals/nodeUtil.js +0 -5
  16. package/es/isArguments.js +3 -3
  17. package/es/isArrayBuffer.js +2 -2
  18. package/es/isBlob.js +2 -2
  19. package/es/isBoolean.js +2 -2
  20. package/es/isDate.js +2 -2
  21. package/es/isEqual.js +3 -3
  22. package/es/isError.js +2 -2
  23. package/es/isFunction.js +2 -2
  24. package/es/isInteger.js +2 -2
  25. package/es/isMatch.js +2 -2
  26. package/es/isNumber.js +2 -2
  27. package/es/isPlainObject.js +4 -4
  28. package/es/isRegExp.js +2 -2
  29. package/es/isSafeInteger.js +2 -2
  30. package/es/isString.js +2 -2
  31. package/es/isSymbol.js +2 -2
  32. package/es/isTypedArray.js +2 -2
  33. package/es/isWeakSet.js +2 -2
  34. package/es/nth.js +3 -3
  35. package/es/random.js +4 -3
  36. package/es/randomInt.js +4 -3
  37. package/es/times.js +2 -2
  38. package/es/unzip.js +2 -1
  39. package/lib/chunk.js +2 -1
  40. package/lib/inRange.js +2 -1
  41. package/lib/internals/decimalAdjust.js +2 -1
  42. package/lib/internals/getSymbols.js +1 -1
  43. package/lib/internals/getTag.js +7 -7
  44. package/lib/internals/getTagWithBugfix.js +5 -5
  45. package/lib/internals/helpers.js +3 -3
  46. package/lib/internals/keys.js +1 -1
  47. package/lib/internals/native.js +14 -7
  48. package/lib/internals/nodeUtil.js +0 -5
  49. package/lib/isArguments.js +2 -2
  50. package/lib/isArrayBuffer.js +1 -1
  51. package/lib/isBlob.js +1 -1
  52. package/lib/isBoolean.js +1 -1
  53. package/lib/isDate.js +1 -1
  54. package/lib/isEqual.js +2 -2
  55. package/lib/isError.js +1 -1
  56. package/lib/isFunction.js +1 -1
  57. package/lib/isInteger.js +1 -1
  58. package/lib/isMatch.js +1 -1
  59. package/lib/isNumber.js +1 -1
  60. package/lib/isPlainObject.js +3 -3
  61. package/lib/isRegExp.js +1 -1
  62. package/lib/isSafeInteger.js +1 -1
  63. package/lib/isString.js +1 -1
  64. package/lib/isSymbol.js +1 -1
  65. package/lib/isTypedArray.js +1 -1
  66. package/lib/isWeakSet.js +1 -1
  67. package/lib/nth.js +2 -2
  68. package/lib/random.js +4 -3
  69. package/lib/randomInt.js +4 -3
  70. package/lib/times.js +1 -1
  71. package/lib/unzip.js +2 -1
  72. package/package.json +4 -1
  73. package/types/internals/native.d.ts +14 -7
@@ -3,28 +3,28 @@
3
3
  var native = require('./native.js');
4
4
 
5
5
  function getRawTag(value) {
6
- var isOwn = native.hasOwnProperty.call(value, native.symToStringTag);
7
- var tag = value[native.symToStringTag];
6
+ var isOwn = native.objectProtoHasOwnProperty.call(value, native.symbolToStringTag);
7
+ var tag = value[native.symbolToStringTag];
8
8
  var unmasked = false;
9
9
  try {
10
- value[native.symToStringTag] = undefined;
10
+ value[native.symbolToStringTag] = undefined;
11
11
  unmasked = true;
12
12
  }
13
13
  catch (e) {
14
14
  }
15
- var result = native.objectToString.call(value);
15
+ var result = native.objectProtoToString.call(value);
16
16
  if (unmasked) {
17
17
  if (isOwn) {
18
- value[native.symToStringTag] = tag;
18
+ value[native.symbolToStringTag] = tag;
19
19
  }
20
20
  else {
21
- delete value[native.symToStringTag];
21
+ delete value[native.symbolToStringTag];
22
22
  }
23
23
  }
24
24
  return result;
25
25
  }
26
26
  function getTag(value) {
27
- return native.symToStringTag && native.symToStringTag in Object(value) ? getRawTag(value) : native.objectToString.call(value);
27
+ return native.symbolToStringTag && native.symbolToStringTag in Object(value) ? getRawTag(value) : native.objectProtoToString.call(value);
28
28
  }
29
29
 
30
30
  module.exports = getTag;
@@ -15,11 +15,11 @@ var promiseCtorString = helpers.toSource(Promise);
15
15
  var setCtorString = helpers.toSource(Set);
16
16
  var weakMapCtorString = helpers.toSource(WeakMap);
17
17
  var getTagWithBugfix = getTag;
18
- if ((dataViewExisted && native.objectToString.call(new DataView(new ArrayBuffer(1))) !== native.dataViewTag) ||
19
- (mapExisted && native.objectToString.call(new Map()) !== native.mapTag) ||
20
- (promiseExisted && native.objectToString.call(Promise.resolve()) !== native.promiseTag) ||
21
- (setExisted && native.objectToString.call(new Set()) !== native.setTag) ||
22
- (weakMapExisted && native.objectToString.call(new WeakMap()) !== native.weakMapTag)) {
18
+ if ((dataViewExisted && native.objectProtoToString.call(new DataView(new ArrayBuffer(1))) !== native.dataViewTag) ||
19
+ (mapExisted && native.objectProtoToString.call(new Map()) !== native.mapTag) ||
20
+ (promiseExisted && native.objectProtoToString.call(Promise.resolve()) !== native.promiseTag) ||
21
+ (setExisted && native.objectProtoToString.call(new Set()) !== native.setTag) ||
22
+ (weakMapExisted && native.objectProtoToString.call(new WeakMap()) !== native.weakMapTag)) {
23
23
  getTagWithBugfix = function (value) {
24
24
  var result = getTag(value);
25
25
  var Ctor = result === native.objectTag ? value.constructor : undefined;
@@ -2,13 +2,13 @@
2
2
 
3
3
  var native = require('./native.js');
4
4
 
5
- exports.VERSION = "1.4.10";
6
- exports.supportedArgumentsType = native.objectToString.call((function () { return arguments; })()) === native.argumentsTag;
5
+ exports.VERSION = "1.5.1";
6
+ exports.supportedArgumentsType = native.objectProtoToString.call((function () { return arguments; })()) === native.argumentsTag;
7
7
  exports.FUNC_ERROR_TEXT = 'Expected a function';
8
8
  function toSource(func) {
9
9
  if (func !== null) {
10
10
  try {
11
- return native.functionToString.call(func);
11
+ return native.functionProtoToString.call(func);
12
12
  }
13
13
  catch (e) {
14
14
  }
@@ -9,7 +9,7 @@ function keys(value) {
9
9
  }
10
10
  var result = [];
11
11
  for (var key in Object(value)) {
12
- if (native.hasOwnProperty.call(value, key) && key !== 'constructor') {
12
+ if (native.objectProtoHasOwnProperty.call(value, key) && key !== 'constructor') {
13
13
  result.push(key);
14
14
  }
15
15
  }
@@ -1,19 +1,26 @@
1
1
  'use strict';
2
2
 
3
3
  exports.objectProto = Object.prototype;
4
- exports.objectToString = exports.objectProto.toString;
4
+ exports.objectProtoToString = exports.objectProto.toString;
5
+ exports.objectProtoHasOwnProperty = exports.objectProto.hasOwnProperty;
6
+ exports.objectProtoPropertyIsEnumerable = exports.objectProto.propertyIsEnumerable;
5
7
  exports.objectGetOwnPropertySymbols = Object.getOwnPropertySymbols;
6
8
  exports.objectGetPrototypeOf = Object.getPrototypeOf;
7
9
  exports.objectKeys = Object.keys;
8
- exports.hasOwnProperty = exports.objectProto.hasOwnProperty;
9
- exports.propertyIsEnumerable = exports.objectProto.propertyIsEnumerable;
10
- exports.functionToString = Function.prototype.toString;
10
+ exports.functionProto = Function.prototype;
11
+ exports.functionProtoToString = exports.functionProto.toString;
11
12
  var symbolExisted = typeof Symbol !== 'undefined';
12
13
  exports.symbolProto = symbolExisted ? Symbol.prototype : undefined;
13
- exports.symToStringTag = symbolExisted ? Symbol.toStringTag : undefined;
14
+ exports.symbolToStringTag = symbolExisted ? Symbol.toStringTag : undefined;
14
15
  exports.arrayProto = Array.prototype;
15
- exports.arrSlice = exports.arrayProto.slice;
16
- exports.arrayAt = exports.arrayProto.at;
16
+ exports.arrayProtoSlice = exports.arrayProto.slice;
17
+ exports.arrayProtoAt = exports.arrayProto.at;
18
+ exports.mathMin = Math.min;
19
+ exports.mathMax = Math.max;
20
+ exports.mathRandom = Math.random;
21
+ exports.mathFloor = Math.floor;
22
+ exports.mathCeil = Math.ceil;
23
+ exports.mathAbs = Math.abs;
17
24
  exports.numberIsFinite = Number.isFinite;
18
25
  exports.numberIsInteger = Number.isInteger;
19
26
  exports.numberIsSafeInteger = Number.isSafeInteger;
@@ -1,18 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var root = require('./root.js');
4
-
5
3
  var freeExports = typeof exports === 'object' && exports && !exports.nodeType && exports;
6
4
  var freeModule = freeExports && typeof module === 'object' && module && !module.nodeType && module;
7
- var moduleExports = freeModule && freeModule.exports === freeExports;
8
- var freeProcess = moduleExports && root.process;
9
5
  var nodeUtil = (function () {
10
6
  try {
11
7
  var types = freeModule && freeModule.require && freeModule.require('util').types;
12
8
  if (types) {
13
9
  return types;
14
10
  }
15
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
16
11
  }
17
12
  catch (e) {
18
13
  }
@@ -6,9 +6,9 @@ var isObjectLike = require('./isObjectLike.js');
6
6
 
7
7
  function isArguments(value) {
8
8
  if (helpers.supportedArgumentsType) {
9
- return native.objectToString.call(value) === native.argumentsTag;
9
+ return native.objectProtoToString.call(value) === native.argumentsTag;
10
10
  }
11
- return isObjectLike(value) && native.hasOwnProperty.call(value, 'callee') && !native.propertyIsEnumerable.call(value, 'callee');
11
+ return isObjectLike(value) && native.objectProtoHasOwnProperty.call(value, 'callee') && !native.objectProtoPropertyIsEnumerable.call(value, 'callee');
12
12
  }
13
13
 
14
14
  module.exports = isArguments;
@@ -4,7 +4,7 @@ var native = require('./internals/native.js');
4
4
  var nodeUtil = require('./internals/nodeUtil.js');
5
5
 
6
6
  function isArrayBuffer(value) {
7
- return nodeUtil.nodeIsArrayBuffer ? nodeUtil.nodeIsArrayBuffer(value) : native.objectToString.call(value) === native.arrayBufferTag;
7
+ return nodeUtil.nodeIsArrayBuffer ? nodeUtil.nodeIsArrayBuffer(value) : native.objectProtoToString.call(value) === native.arrayBufferTag;
8
8
  }
9
9
 
10
10
  module.exports = isArrayBuffer;
package/lib/isBlob.js CHANGED
@@ -7,7 +7,7 @@ function isBlob(value) {
7
7
  if (blobExisted && value instanceof Blob) {
8
8
  return true;
9
9
  }
10
- return native.objectToString.call(value) === native.blobTag;
10
+ return native.objectProtoToString.call(value) === native.blobTag;
11
11
  }
12
12
 
13
13
  module.exports = isBlob;
package/lib/isBoolean.js CHANGED
@@ -3,7 +3,7 @@
3
3
  var native = require('./internals/native.js');
4
4
 
5
5
  function isBoolean(value) {
6
- return value === true || value === false || native.objectToString.call(value) === native.booleanTag;
6
+ return value === true || value === false || native.objectProtoToString.call(value) === native.booleanTag;
7
7
  }
8
8
 
9
9
  module.exports = isBoolean;
package/lib/isDate.js CHANGED
@@ -4,7 +4,7 @@ var native = require('./internals/native.js');
4
4
  var nodeUtil = require('./internals/nodeUtil.js');
5
5
 
6
6
  function isDate(value) {
7
- return nodeUtil.nodeIsDate ? nodeUtil.nodeIsDate(value) : native.objectToString.call(value) === native.dateTag;
7
+ return nodeUtil.nodeIsDate ? nodeUtil.nodeIsDate(value) : native.objectProtoToString.call(value) === native.dateTag;
8
8
  }
9
9
 
10
10
  module.exports = isDate;
package/lib/isEqual.js CHANGED
@@ -27,7 +27,7 @@ function setToArray(set) {
27
27
  return orderBy(result);
28
28
  }
29
29
  function argToArray(arg) {
30
- return native.arrSlice.call(arg);
30
+ return native.arrayProtoSlice.call(arg);
31
31
  }
32
32
  function toBufferView(bufferSource) {
33
33
  return new Uint8Array(bufferSource.buffer || bufferSource, bufferSource.byteOffset || 0, bufferSource.byteLength);
@@ -154,7 +154,7 @@ function isEqualDeep(value, other, customizer, strictCheck, valueStack, otherSta
154
154
  continue;
155
155
  }
156
156
  }
157
- if (!(native.hasOwnProperty.call(other, key) && isEqualDeep(value[key], other[key], customizer, strictCheck, valueStack, otherStack))) {
157
+ if (!(native.objectProtoHasOwnProperty.call(other, key) && isEqualDeep(value[key], other[key], customizer, strictCheck, valueStack, otherStack))) {
158
158
  return false;
159
159
  }
160
160
  if (!skipCtor && key === 'constructor') {
package/lib/isError.js CHANGED
@@ -10,7 +10,7 @@ function isError(value) {
10
10
  if (value instanceof Error) {
11
11
  return true;
12
12
  }
13
- var tag = native.objectToString.call(value);
13
+ var tag = native.objectProtoToString.call(value);
14
14
  return tag === native.errorTag || tag === native.domExceptionTag;
15
15
  }
16
16
 
package/lib/isFunction.js CHANGED
@@ -6,7 +6,7 @@ function isFunction(value) {
6
6
  if (typeof value === 'function') {
7
7
  return true;
8
8
  }
9
- var tag = native.objectToString.call(value);
9
+ var tag = native.objectProtoToString.call(value);
10
10
  return native.functionTags.some(function (item) { return item === tag; });
11
11
  }
12
12
 
package/lib/isInteger.js CHANGED
@@ -4,7 +4,7 @@ var native = require('./internals/native.js');
4
4
  var isFinite = require('./isFinite.js');
5
5
 
6
6
  function isInteger(value) {
7
- return native.numberIsInteger ? native.numberIsInteger(value) : isFinite(value) && Math.floor(value) === value;
7
+ return native.numberIsInteger ? native.numberIsInteger(value) : isFinite(value) && native.mathFloor(value) === value;
8
8
  }
9
9
 
10
10
  module.exports = isInteger;
package/lib/isMatch.js CHANGED
@@ -5,7 +5,7 @@ var native = require('./internals/native.js');
5
5
  var isEqual = require('./isEqual.js');
6
6
 
7
7
  function isDeepComparable(object, source) {
8
- return native.objectToString.call(object) === native.objectTag && native.objectToString.call(source) === native.objectTag;
8
+ return native.objectProtoToString.call(object) === native.objectTag && native.objectProtoToString.call(source) === native.objectTag;
9
9
  }
10
10
  function baseIsMatch(object, source, customizer, strictCheck, objStack, srcStack, executedCustomizer) {
11
11
  if (executedCustomizer === void 0) { executedCustomizer = false; }
package/lib/isNumber.js CHANGED
@@ -3,7 +3,7 @@
3
3
  var native = require('./internals/native.js');
4
4
 
5
5
  function isNumber(value) {
6
- return typeof value === 'number' || native.objectToString.call(value) === native.numberTag;
6
+ return typeof value === 'number' || native.objectProtoToString.call(value) === native.numberTag;
7
7
  }
8
8
 
9
9
  module.exports = isNumber;
@@ -4,7 +4,7 @@ var getTag = require('./internals/getTag.js');
4
4
  var native = require('./internals/native.js');
5
5
  var isObjectLike = require('./isObjectLike.js');
6
6
 
7
- var objectCtorString = native.functionToString.call(Object);
7
+ var objectCtorString = native.functionProtoToString.call(Object);
8
8
  function isPlainObject(value) {
9
9
  if (!isObjectLike(value) || getTag(value) !== native.objectTag) {
10
10
  return false;
@@ -13,8 +13,8 @@ function isPlainObject(value) {
13
13
  if (proto === null) {
14
14
  return true;
15
15
  }
16
- var Ctor = native.hasOwnProperty.call(proto, 'constructor') && proto.constructor;
17
- return typeof Ctor === 'function' && Ctor instanceof Ctor && native.functionToString.call(Ctor) === objectCtorString;
16
+ var Ctor = native.objectProtoHasOwnProperty.call(proto, 'constructor') && proto.constructor;
17
+ return typeof Ctor === 'function' && Ctor instanceof Ctor && native.functionProtoToString.call(Ctor) === objectCtorString;
18
18
  }
19
19
 
20
20
  module.exports = isPlainObject;
package/lib/isRegExp.js CHANGED
@@ -4,7 +4,7 @@ var native = require('./internals/native.js');
4
4
  var nodeUtil = require('./internals/nodeUtil.js');
5
5
 
6
6
  function isRegExp(value) {
7
- return nodeUtil.nodeIsRegExp ? nodeUtil.nodeIsRegExp(value) : native.objectToString.call(value) === native.regExpTag;
7
+ return nodeUtil.nodeIsRegExp ? nodeUtil.nodeIsRegExp(value) : native.objectProtoToString.call(value) === native.regExpTag;
8
8
  }
9
9
 
10
10
  module.exports = isRegExp;
@@ -4,7 +4,7 @@ var native = require('./internals/native.js');
4
4
  var isInteger = require('./isInteger.js');
5
5
 
6
6
  function isSafeInteger(value) {
7
- return native.numberIsSafeInteger ? native.numberIsSafeInteger(value) : isInteger(value) && Math.abs(value) <= native.MAX_SAFE_INTEGER;
7
+ return native.numberIsSafeInteger ? native.numberIsSafeInteger(value) : isInteger(value) && native.mathAbs(value) <= native.MAX_SAFE_INTEGER;
8
8
  }
9
9
 
10
10
  module.exports = isSafeInteger;
package/lib/isString.js CHANGED
@@ -3,7 +3,7 @@
3
3
  var native = require('./internals/native.js');
4
4
 
5
5
  function isString(value) {
6
- return typeof value === 'string' || native.objectToString.call(value) === native.stringTag;
6
+ return typeof value === 'string' || native.objectProtoToString.call(value) === native.stringTag;
7
7
  }
8
8
 
9
9
  module.exports = isString;
package/lib/isSymbol.js CHANGED
@@ -3,7 +3,7 @@
3
3
  var native = require('./internals/native.js');
4
4
 
5
5
  function isSymbol(value) {
6
- return typeof value === 'symbol' || native.objectToString.call(value) === native.symbolTag;
6
+ return typeof value === 'symbol' || native.objectProtoToString.call(value) === native.symbolTag;
7
7
  }
8
8
 
9
9
  module.exports = isSymbol;
@@ -10,7 +10,7 @@ function isTypedArray(value) {
10
10
  return nodeUtil.nodeIsTypedArray(value);
11
11
  }
12
12
  if (isObjectLike(value) && isLength(value.length)) {
13
- var tag_1 = native.objectToString.call(value);
13
+ var tag_1 = native.objectProtoToString.call(value);
14
14
  return native.typedArrayTags.some(function (item) { return item === tag_1; });
15
15
  }
16
16
  return false;
package/lib/isWeakSet.js CHANGED
@@ -3,7 +3,7 @@
3
3
  var native = require('./internals/native.js');
4
4
 
5
5
  function isWeakSet(value) {
6
- return native.objectToString.call(value) === native.weakSetTag;
6
+ return native.objectProtoToString.call(value) === native.weakSetTag;
7
7
  }
8
8
 
9
9
  module.exports = isWeakSet;
package/lib/nth.js CHANGED
@@ -8,8 +8,8 @@ function nth(array, n) {
8
8
  if (!isArrayLike(array)) {
9
9
  return undefined;
10
10
  }
11
- if (typeof native.arrayAt === 'function') {
12
- return native.arrayAt.call(array, n);
11
+ if (typeof native.arrayProtoAt === 'function') {
12
+ return native.arrayProtoAt.call(array, n);
13
13
  }
14
14
  var index = n < 0 ? n + array.length : n;
15
15
  return array[index];
package/lib/random.js CHANGED
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var native = require('./internals/native.js');
3
4
  var toFinite = require('./toFinite.js');
4
5
 
5
6
  function random(lower, upper) {
@@ -7,9 +8,9 @@ function random(lower, upper) {
7
8
  if (upper === void 0) { upper = 1; }
8
9
  lower = toFinite(lower);
9
10
  upper = toFinite(upper);
10
- var min = Math.min(lower, upper);
11
- var max = Math.max(lower, upper);
12
- return min + Math.random() * (max - min);
11
+ var min = native.mathMin(lower, upper);
12
+ var max = native.mathMax(lower, upper);
13
+ return min + native.mathRandom() * (max - min);
13
14
  }
14
15
 
15
16
  module.exports = random;
package/lib/randomInt.js CHANGED
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var native = require('./internals/native.js');
3
4
  var toFinite = require('./toFinite.js');
4
5
 
5
6
  function randomInt(lower, upper) {
@@ -7,14 +8,14 @@ function randomInt(lower, upper) {
7
8
  if (upper === void 0) { upper = 1; }
8
9
  lower = toFinite(lower);
9
10
  upper = toFinite(upper);
10
- var min = Math.ceil(Math.min(lower, upper) || 0);
11
- var max = Math.floor(Math.max(lower, upper) || 0);
11
+ var min = native.mathCeil(native.mathMin(lower, upper) || 0);
12
+ var max = native.mathFloor(native.mathMax(lower, upper) || 0);
12
13
  if (min > max) {
13
14
  var temp = min;
14
15
  min = max;
15
16
  max = temp;
16
17
  }
17
- return Math.floor(min + Math.random() * (max - min + 1));
18
+ return native.mathFloor(min + native.mathRandom() * (max - min + 1));
18
19
  }
19
20
 
20
21
  module.exports = randomInt;
package/lib/times.js CHANGED
@@ -11,7 +11,7 @@ function times(n, iteratee) {
11
11
  return [];
12
12
  }
13
13
  var index = 0;
14
- var length = Math.min(isInteger(n) ? n : Math.floor(isFinite(n) ? n : 0), native.MAX_ARRAY_LENGTH);
14
+ var length = native.mathMin(isInteger(n) ? n : native.mathFloor(isFinite(n) ? n : 0), native.MAX_ARRAY_LENGTH);
15
15
  var result = Array(length);
16
16
  var func = typeof iteratee === 'function' ? iteratee : identity;
17
17
  while (index < length) {
package/lib/unzip.js CHANGED
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var native = require('./internals/native.js');
3
4
  var isArray = require('./isArray.js');
4
5
  var isArrayLikeObject = require('./isArrayLikeObject.js');
5
6
 
@@ -10,7 +11,7 @@ function unzip(array) {
10
11
  var length = 0;
11
12
  array = array.filter(function (group) {
12
13
  if (isArrayLikeObject(group)) {
13
- length = Math.max(group.length, length);
14
+ length = native.mathMax(group.length, length);
14
15
  return true;
15
16
  }
16
17
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ut2",
3
- "version": "1.4.10",
3
+ "version": "1.5.1",
4
4
  "author": "caijf",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
@@ -85,5 +85,8 @@
85
85
  "tslib": "^2.6.2",
86
86
  "typescript": "^5.2.2",
87
87
  "husky": "^8.0.0"
88
+ },
89
+ "engines": {
90
+ "node": ">=10"
88
91
  }
89
92
  }
@@ -1,19 +1,26 @@
1
1
  export declare const objectProto: Object;
2
- export declare const objectToString: () => string;
2
+ export declare const objectProtoToString: () => string;
3
+ export declare const objectProtoHasOwnProperty: (v: PropertyKey) => boolean;
4
+ export declare const objectProtoPropertyIsEnumerable: (v: PropertyKey) => boolean;
3
5
  export declare const objectGetOwnPropertySymbols: (o: any) => symbol[];
4
6
  export declare const objectGetPrototypeOf: (o: any) => any;
5
7
  export declare const objectKeys: {
6
8
  (o: object): string[];
7
9
  (o: {}): string[];
8
10
  };
9
- export declare const hasOwnProperty: (v: PropertyKey) => boolean;
10
- export declare const propertyIsEnumerable: (v: PropertyKey) => boolean;
11
- export declare const functionToString: () => string;
11
+ export declare const functionProto: Function;
12
+ export declare const functionProtoToString: () => string;
12
13
  export declare const symbolProto: Symbol | undefined;
13
- export declare const symToStringTag: typeof Symbol.toStringTag | undefined;
14
+ export declare const symbolToStringTag: typeof Symbol.toStringTag | undefined;
14
15
  export declare const arrayProto: any[];
15
- export declare const arrSlice: (start?: number | undefined, end?: number | undefined) => any[];
16
- export declare const arrayAt: (index: number) => any;
16
+ export declare const arrayProtoSlice: (start?: number | undefined, end?: number | undefined) => any[];
17
+ export declare const arrayProtoAt: (index: number) => any;
18
+ export declare const mathMin: (...values: number[]) => number;
19
+ export declare const mathMax: (...values: number[]) => number;
20
+ export declare const mathRandom: () => number;
21
+ export declare const mathFloor: (x: number) => number;
22
+ export declare const mathCeil: (x: number) => number;
23
+ export declare const mathAbs: (x: number) => number;
17
24
  export declare const numberIsFinite: (number: unknown) => boolean;
18
25
  export declare const numberIsInteger: (number: unknown) => boolean;
19
26
  export declare const numberIsSafeInteger: (number: unknown) => boolean;