ut2 1.9.1 → 1.9.2
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/README.md +2 -2
- package/dist/ut2.js +6 -12
- package/dist/ut2.js.map +1 -1
- package/dist/ut2.min.js +1 -1
- package/dist/ut2.min.js.map +1 -1
- package/es/clamp.js +1 -2
- package/es/conforms.js +1 -2
- package/es/conformsTo.js +1 -2
- package/es/countBy.js +1 -2
- package/es/curry.js +1 -2
- package/es/defaultTo.js +1 -2
- package/es/escapeRegExp.js +1 -3
- package/es/every.js +1 -2
- package/es/filter.js +1 -2
- package/es/find.js +1 -2
- package/es/forEach.js +1 -2
- package/es/forEachRight.js +1 -2
- package/es/fromPairs.js +1 -2
- package/es/groupBy.js +1 -2
- package/es/gt.js +1 -2
- package/es/gte.js +1 -2
- package/es/internals/helpers.js +1 -1
- package/es/internals/root.js +1 -2
- package/es/isPlainObject.js +1 -1
- package/es/keyBy.js +1 -2
- package/es/lowerFirst.js +1 -2
- package/es/lt.js +1 -2
- package/es/lte.js +1 -2
- package/es/map.js +1 -2
- package/es/max.js +1 -2
- package/es/min.js +1 -2
- package/es/omit.js +1 -2
- package/es/orderBy.js +1 -2
- package/es/partial.js +1 -2
- package/es/partition.js +1 -2
- package/es/pick.js +1 -2
- package/es/random.js +1 -1
- package/es/randomInt.js +1 -1
- package/es/range.js +1 -2
- package/es/reduce.js +1 -2
- package/es/reduceRight.js +1 -2
- package/es/some.js +1 -2
- package/es/times.js +1 -2
- package/es/toNumber.js +1 -5
- package/es/uniqueId.js +3 -5
- package/es/upperFirst.js +1 -2
- package/lib/clamp.js +1 -2
- package/lib/conforms.js +1 -2
- package/lib/conformsTo.js +1 -2
- package/lib/countBy.js +1 -2
- package/lib/curry.js +1 -2
- package/lib/defaultTo.js +1 -2
- package/lib/escapeRegExp.js +1 -3
- package/lib/every.js +1 -2
- package/lib/filter.js +1 -2
- package/lib/find.js +1 -2
- package/lib/forEach.js +1 -2
- package/lib/forEachRight.js +1 -2
- package/lib/fromPairs.js +1 -2
- package/lib/groupBy.js +1 -2
- package/lib/gt.js +1 -2
- package/lib/gte.js +1 -2
- package/lib/index.js +4 -16
- package/lib/internals/comparator.js +8 -4
- package/lib/internals/helpers.js +10 -5
- package/lib/internals/native.js +106 -53
- package/lib/internals/nodeUtil.js +13 -6
- package/lib/internals/root.js +1 -2
- package/lib/keyBy.js +1 -2
- package/lib/lowerFirst.js +1 -2
- package/lib/lt.js +1 -2
- package/lib/lte.js +1 -2
- package/lib/map.js +1 -2
- package/lib/max.js +1 -2
- package/lib/min.js +1 -2
- package/lib/omit.js +1 -2
- package/lib/orderBy.js +1 -2
- package/lib/partial.js +1 -2
- package/lib/partition.js +1 -2
- package/lib/pick.js +1 -2
- package/lib/range.js +1 -2
- package/lib/reduce.js +1 -2
- package/lib/reduceRight.js +1 -2
- package/lib/some.js +1 -2
- package/lib/times.js +1 -2
- package/lib/toNumber.js +1 -5
- package/lib/uniqueId.js +3 -5
- package/lib/upperFirst.js +1 -2
- package/package.json +2 -2
- package/types/camelCase.d.ts +1 -1
- package/types/ceil.d.ts +1 -1
- package/types/compact.d.ts +1 -1
- package/types/eq.d.ts +1 -1
- package/types/escape.d.ts +1 -1
- package/types/escapeRegExp.d.ts +1 -1
- package/types/floor.d.ts +1 -1
- package/types/internals/native.d.ts +3 -3
- package/types/isBlob.d.ts +2 -2
- package/types/isLength.d.ts +1 -1
- package/types/isObject.d.ts +1 -1
- package/types/isTypedArray.d.ts +1 -1
- package/types/kebabCase.d.ts +1 -1
- package/types/merge.d.ts +1 -1
- package/types/orderBy.d.ts +1 -1
- package/types/pascalCase.d.ts +1 -1
- package/types/random.d.ts +10 -6
- package/types/randomInt.d.ts +9 -5
- package/types/round.d.ts +1 -1
- package/types/snakeCase.d.ts +1 -1
- package/types/toLength.d.ts +1 -1
- package/types/uniqueId.d.ts +3 -3
- package/types/words.d.ts +1 -1
- package/types/xor.d.ts +1 -1
package/es/clamp.js
CHANGED
package/es/conforms.js
CHANGED
package/es/conformsTo.js
CHANGED
package/es/countBy.js
CHANGED
package/es/curry.js
CHANGED
package/es/defaultTo.js
CHANGED
package/es/escapeRegExp.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
var reRegExpChar = /[\\^$.*+?\-()[\]{}|]/g;
|
|
2
2
|
var reHasRegExpChar = RegExp(reRegExpChar.source);
|
|
3
3
|
function escapeRegExp(string) {
|
|
4
|
-
return string && reHasRegExpChar.test(string)
|
|
5
|
-
? string.replace(reRegExpChar, '\\$&')
|
|
6
|
-
: string || '';
|
|
4
|
+
return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\$&') : string || '';
|
|
7
5
|
}
|
|
8
6
|
|
|
9
7
|
export { escapeRegExp as default };
|
package/es/every.js
CHANGED
package/es/filter.js
CHANGED
package/es/find.js
CHANGED
package/es/forEach.js
CHANGED
package/es/forEachRight.js
CHANGED
package/es/fromPairs.js
CHANGED
package/es/groupBy.js
CHANGED
package/es/gt.js
CHANGED
package/es/gte.js
CHANGED
package/es/internals/helpers.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import getTag from './getTag.js';
|
|
2
2
|
import { argumentsTag, functionProtoToString } from './native.js';
|
|
3
3
|
|
|
4
|
-
var VERSION = "1.9.
|
|
4
|
+
var VERSION = "1.9.2";
|
|
5
5
|
var supportedArgumentsType = getTag((function () { return arguments; })()) === argumentsTag;
|
|
6
6
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
7
7
|
function toSource(func) {
|
package/es/internals/root.js
CHANGED
|
@@ -4,6 +4,5 @@ var freeGlobalThis = globalThisExisted && globalThis.Object === Object && global
|
|
|
4
4
|
var freeGlobal = globalExisted && global.Object === Object && global;
|
|
5
5
|
var freeSelf = selfExisted && self.Object === Object && self;
|
|
6
6
|
var root = freeGlobalThis || freeGlobal || freeSelf || Function('return this')();
|
|
7
|
-
var root$1 = root;
|
|
8
7
|
|
|
9
|
-
export { root
|
|
8
|
+
export { root as default };
|
package/es/isPlainObject.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import getTag from './internals/getTag.js';
|
|
2
|
-
import { functionProtoToString, objectTag,
|
|
2
|
+
import { functionProtoToString, objectTag, objectProtoHasOwnProperty, objectGetPrototypeOf } from './internals/native.js';
|
|
3
3
|
import isObjectLike from './isObjectLike.js';
|
|
4
4
|
|
|
5
5
|
var objectCtorString = functionProtoToString.call(Object);
|
package/es/keyBy.js
CHANGED
package/es/lowerFirst.js
CHANGED
package/es/lt.js
CHANGED
package/es/lte.js
CHANGED
package/es/map.js
CHANGED
package/es/max.js
CHANGED
package/es/min.js
CHANGED
package/es/omit.js
CHANGED
package/es/orderBy.js
CHANGED
|
@@ -20,6 +20,5 @@ var orderBy = function (collection, iteratees, orders) {
|
|
|
20
20
|
});
|
|
21
21
|
return result.sort(function (a, b) { return compareMultiple(a, b, orders); }).map(function (item) { return item.value; });
|
|
22
22
|
};
|
|
23
|
-
var orderBy$1 = orderBy;
|
|
24
23
|
|
|
25
|
-
export { orderBy
|
|
24
|
+
export { orderBy as default };
|
package/es/partial.js
CHANGED
package/es/partition.js
CHANGED
package/es/pick.js
CHANGED
package/es/random.js
CHANGED
package/es/randomInt.js
CHANGED
package/es/range.js
CHANGED
package/es/reduce.js
CHANGED
package/es/reduceRight.js
CHANGED
package/es/some.js
CHANGED
package/es/times.js
CHANGED
package/es/toNumber.js
CHANGED
|
@@ -19,11 +19,7 @@ function toNumber(value) {
|
|
|
19
19
|
}
|
|
20
20
|
value = value.trim();
|
|
21
21
|
var isBinary = reIsBinary.test(value);
|
|
22
|
-
return isBinary || reIsOctal.test(value)
|
|
23
|
-
? parseInt(value.slice(2), isBinary ? 2 : 8)
|
|
24
|
-
: reIsBadHex.test(value)
|
|
25
|
-
? NaN
|
|
26
|
-
: +value;
|
|
22
|
+
return isBinary || reIsOctal.test(value) ? parseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NaN : +value;
|
|
27
23
|
}
|
|
28
24
|
|
|
29
25
|
export { toNumber as default };
|
package/es/uniqueId.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import toString from './toString.js';
|
|
2
|
-
|
|
3
1
|
var idCounter = 0;
|
|
2
|
+
var defaultPrefix = '_' + Math.random().toString(36).substring(2, 4);
|
|
4
3
|
function uniqueId(prefix) {
|
|
5
|
-
if (prefix === void 0) { prefix =
|
|
6
|
-
|
|
7
|
-
return toString(prefix) + id;
|
|
4
|
+
if (prefix === void 0) { prefix = defaultPrefix; }
|
|
5
|
+
return '' + prefix + ++idCounter;
|
|
8
6
|
}
|
|
9
7
|
|
|
10
8
|
export { uniqueId as default };
|
package/es/upperFirst.js
CHANGED
package/lib/clamp.js
CHANGED
package/lib/conforms.js
CHANGED
package/lib/conformsTo.js
CHANGED
package/lib/countBy.js
CHANGED
package/lib/curry.js
CHANGED
package/lib/defaultTo.js
CHANGED
package/lib/escapeRegExp.js
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
var reRegExpChar = /[\\^$.*+?\-()[\]{}|]/g;
|
|
4
4
|
var reHasRegExpChar = RegExp(reRegExpChar.source);
|
|
5
5
|
function escapeRegExp(string) {
|
|
6
|
-
return string && reHasRegExpChar.test(string)
|
|
7
|
-
? string.replace(reRegExpChar, '\\$&')
|
|
8
|
-
: string || '';
|
|
6
|
+
return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\$&') : string || '';
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
module.exports = escapeRegExp;
|
package/lib/every.js
CHANGED
package/lib/filter.js
CHANGED
package/lib/find.js
CHANGED
package/lib/forEach.js
CHANGED
package/lib/forEachRight.js
CHANGED
package/lib/fromPairs.js
CHANGED
package/lib/groupBy.js
CHANGED
package/lib/gt.js
CHANGED
package/lib/gte.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -261,19 +261,7 @@ exports.toNumber = toNumber;
|
|
|
261
261
|
exports.toSafeInteger = toSafeInteger;
|
|
262
262
|
exports.toString = toString;
|
|
263
263
|
exports.uniqueId = uniqueId;
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
Object.defineProperty(exports, "MAX_SAFE_INTEGER", {
|
|
269
|
-
enumerable: true,
|
|
270
|
-
get: function () { return native.MAX_SAFE_INTEGER; }
|
|
271
|
-
});
|
|
272
|
-
Object.defineProperty(exports, "MIN_SAFE_INTEGER", {
|
|
273
|
-
enumerable: true,
|
|
274
|
-
get: function () { return native.MIN_SAFE_INTEGER; }
|
|
275
|
-
});
|
|
276
|
-
Object.defineProperty(exports, "VERSION", {
|
|
277
|
-
enumerable: true,
|
|
278
|
-
get: function () { return helpers.VERSION; }
|
|
279
|
-
});
|
|
264
|
+
exports.MAX_ARRAY_LENGTH = native.MAX_ARRAY_LENGTH;
|
|
265
|
+
exports.MAX_SAFE_INTEGER = native.MAX_SAFE_INTEGER;
|
|
266
|
+
exports.MIN_SAFE_INTEGER = native.MIN_SAFE_INTEGER;
|
|
267
|
+
exports.VERSION = helpers.VERSION;
|
|
@@ -11,17 +11,21 @@ function createOperation(comparator) {
|
|
|
11
11
|
return comparator(value, other);
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
var baseGt = function (value, other) {
|
|
15
15
|
return value > other;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
var baseGte = function (value, other) {
|
|
18
18
|
return value >= other;
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
var baseLt = function (value, other) {
|
|
21
21
|
return value < other;
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
var baseLte = function (value, other) {
|
|
24
24
|
return value <= other;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
exports.baseGt = baseGt;
|
|
28
|
+
exports.baseGte = baseGte;
|
|
29
|
+
exports.baseLt = baseLt;
|
|
30
|
+
exports.baseLte = baseLte;
|
|
27
31
|
exports.createOperation = createOperation;
|
package/lib/internals/helpers.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var getTag = require('./getTag.js');
|
|
4
4
|
var native = require('./native.js');
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
var VERSION = "1.9.2";
|
|
7
|
+
var supportedArgumentsType = getTag((function () { return arguments; })()) === native.argumentsTag;
|
|
8
|
+
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
9
9
|
function toSource(func) {
|
|
10
10
|
if (func !== null) {
|
|
11
11
|
try {
|
|
@@ -21,7 +21,12 @@ function toSource(func) {
|
|
|
21
21
|
}
|
|
22
22
|
return '';
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
var stubFlase = function () { return false; };
|
|
25
|
+
var stubTrue = function () { return true; };
|
|
26
26
|
|
|
27
|
+
exports.FUNC_ERROR_TEXT = FUNC_ERROR_TEXT;
|
|
28
|
+
exports.VERSION = VERSION;
|
|
29
|
+
exports.stubFlase = stubFlase;
|
|
30
|
+
exports.stubTrue = stubTrue;
|
|
31
|
+
exports.supportedArgumentsType = supportedArgumentsType;
|
|
27
32
|
exports.toSource = toSource;
|