8000 Rebuild lodash and docs. · lodash/lodash@a12c379 · GitHub
[go: up one dir, main page]

Skip to content

Commit a12c379

Browse files
committed
Rebuild lodash and docs.
1 parent 48bc8b4 commit a12c379

File tree

9 files changed

+490
-470
lines changed

9 files changed

+490
-470
lines changed

dist/lodash.core.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
var undefined;
1414

1515
/** Used as the semantic version number. */
16-
var VERSION = '4.16.2';
16+
var VERSION = '4.16.3';
1717

1818
/** Error message constants. */
1919
var FUNC_ERROR_TEXT = 'Expected a function';
@@ -40,6 +40,7 @@
4040
genTag = '[object GeneratorFunction]',
4141
numberTag = '[object Number]',
4242
objectTag = '[object Object]',
43+
proxyTag = '[object Proxy]',
4344
regexpTag = '[object RegExp]',
4445
stringTag = '[object String]';
4546

@@ -369,7 +370,7 @@
369370
if (objectCreate) {
370371
return objectCreate(proto);
371372
}
372-
object.prototype = prototype;
373+
object.prototype = proto;
373374
var result = new object;
374375
object.prototype = undefined;
375376
return result;
@@ -2688,7 +2689,7 @@
26882689
// The use of `Object#toString` avoids issues with the `typeof` operator
26892690
// in Safari 8-9 which returns 'object' for typed array and other constructors.
26902691
var tag = isObject(value) ? objectToString.call(value) : '';
2691-
return tag == funcTag || tag == genTag;
2692+
return tag == funcTag || tag == genTag || tag == proxyTag;
26922693
}
26932694

26942695
/**

dist/lodash.core.min.js

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lodash.fp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ return /******/ (function(modules) { // webpackBootstrap
6868
return baseConvert(lodash, lodash, options);
6969
}
7070

71-
if (typeof _ == 'function') {
71+
if (typeof _ == 'function' && typeof _.runInContext == 'function') {
7272
_ = browserConvert(_.runInContext());
7373
}
7474
module.exports = browserConvert;

dist/lodash.fp.min.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lodash.js

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
var undefined;
1313

1414
/** Used as the semantic version number. */
15-
var VERSION = '4.16.2';
15+
var VERSION = '4.16.3';
1616

1717
/** Used as the size to enable large array optimizations. */
1818
var LARGE_ARRAY_SIZE = 200;
@@ -95,6 +95,7 @@
9595
numberTag = '[object Number]',
9696
objectTag = '[object Object]',
9797
promiseTag = '[object Promise]',
98+
proxyTag = '[object Proxy]',
9899
regexpTag = '[object RegExp]',
99100
setTag = '[object Set]',
100101
stringTag = '[object String]',
@@ -1469,14 +1470,21 @@
14691470
Symbol = context.Symbol,
14701471
Uint8Array = context.Uint8Array,
14711472
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
1472-
defineProperty = Object.defineProperty,
14731473
getPrototype = overArg(Object.getPrototypeOf, Object),
14741474
iteratorSymbol = Symbol ? Symbol.iterator : undefined,
14751475
objectCreate = Object.create,
14761476
propertyIsEnumerable = objectProto.propertyIsEnumerable,
14771477
splice = arrayProto.splice,
14781478
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
14791479

1480+
var defineProperty = (function() {
1481+
try {
1482+
var func = getNative(Object, 'defineProperty');
1483+
func({}, '', {});
1484+
return func;
1485+
} catch (e) {}
1486+
}());
1487+
14801488
/** Mocked built-ins. */
14811489
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
14821490
ctxNow = Date && Date.now !== root.Date.now && Date.now,
@@ -1503,8 +1511,7 @@
15031511
Promise = getNative(context, 'Promise'),
15041512
Set = getNative(context, 'Set'),
15051513
WeakMap = getNative(context, 'WeakMap'),
1506-
nativeCreate = getNative(Object, 'create'),
1507-
nativeDefineProperty = getNative(Object, 'defineProperty');
1514+
nativeCreate = getNative(Object, 'create');
15081515

15091516
/** Used to store function metadata. */
15101517
var metaMap = WeakMap && new WeakMap;
@@ -1672,7 +1679,7 @@
16721679
if (objectCreate) {
16731680
return objectCreate(proto);
16741681
}
1675-
object.prototype = prototype;
1682+
object.prototype = proto;
16761683
var result = new object;
16771684
object.prototype = undefined;
16781685
return result;
@@ -2462,7 +2469,7 @@
24622469
*/
24632470
function assignMergeValue(object, key, value) {
24642471
if ((value !== undefined && !eq(object[key], value)) ||
2465-
(typeof key == 'number' && value === undefined && !(key in object))) {
2472+
(value === undefined && !(key in object))) {
24662473
baseAssignValue(object, key, value);
24672474
}
24682475
}
@@ -3271,6 +3278,13 @@
32713278
othIsObj = othTag == objectTag,
32723279
isSameTag = objTag == othTag;
32733280

3281+
if (isSameTag && isBuffer(object)) {
3282+
if (!isBuffer(other)) {
3283+
return false;
3284+
}
3285+
objIsArr = true;
3286+
objIsObj = false;
3287+
}
32743288
if (isSameTag && !objIsObj) {
32753289
stack || (stack = new Stack);
32763290
return (objIsArr || isTypedArray(object))
@@ -3616,29 +3630,32 @@
36163630
var isCommon = newValue === undefined;
36173631

36183632
if (isCommon) {
3633+
var isArr = isArray(srcValue),
3634+
isTyped = !isArr && isTypedArray(srcValue);
3635+
36193636
newValue = srcValue;
3620-
if (isArray(srcValue) || isTypedArray(srcValue)) {
3637+
if (isArr || isTyped) {
36213638
if (isArray(objValue)) {
36223639
newValue = objValue;
36233640
}
36243641
else if (isArrayLikeObject(objValue)) {
36253642
newValue = copyArray(objValue);
36263643
}
3627-
else {
3644+
else if (isTyped) {
36283645
isCommon = false;
3629-
newValue = baseClone(srcValue, true);
3646+
newValue = cloneTypedArray(srcValue, true);
3647+
}
3648+
else {
3649+
newValue = [];
36303650
}
36313651
}
36323652
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
3653+
newValue = objValue;
36333654
if (isArguments(objValue)) {
36343655
newValue = toPlainObject(objValue);
36353656
}
36363657
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
3637-
isCommon = false;
3638-
newValue = baseClone(srcValue, true);
3639-
}
3640-
else {
3641-
newValue = objValue;
3658+
newValue = initCloneObject(srcValue);
36423659
}
36433660
}
36443661
else {
@@ -3984,8 +4001,8 @@
39844001
* @param {Function} string The `toString` result.
39854002
* @returns {Function} Returns `func`.
39864003
*/
3987-
var baseSetToString = !nativeDefineProperty ? identity : function(func, string) {
3988-
return nativeDefineProperty(func, 'toString', {
4004+
var baseSetToString = !defineProperty ? identity : function(func, string) {
4005+
return defineProperty(func, 'toString', {
39894006
'configurable': true,
39904007
'enumerable': false,
39914008
'value': constant(string),
@@ -11555,7 +11572,7 @@
1155511572
// The use of `Object#toString` avoids issues with the `typeof` operator
1155611573
// in Safari 8-9 which returns 'object' for typed array and other constructors.
1155711574
var tag = isObject(value) ? objectToString.call(value) : '';
11558-
return tag == funcTag || tag == genTag;
11575+
return tag == funcTag || tag == genTag || tag == proxyTag;
1155911576
}
1156011577

1156111578
/**

0 commit comments

Comments
 (0)
0