8
0
Piotrek Koszuliński 9 лет назад
Родитель
Сommit
1e3b5ce22b
100 измененных файлов с 450 добавлено и 314 удалено
  1. 2 1
      packages/ckeditor5-utils/src/lib/lodash/_Hash.js
  2. 2 2
      packages/ckeditor5-utils/src/lib/lodash/_Map.js
  3. 6 5
      packages/ckeditor5-utils/src/lib/lodash/_MapCache.js
  4. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_Reflect.js
  5. 2 2
      packages/ckeditor5-utils/src/lib/lodash/_Set.js
  6. 6 5
      packages/ckeditor5-utils/src/lib/lodash/_Stack.js
  7. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_Symbol.js
  8. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_Uint8Array.js
  9. 7 0
      packages/ckeditor5-utils/src/lib/lodash/_WeakMap.js
  10. 1 0
      packages/ckeditor5-utils/src/lib/lodash/_addMapEntry.js
  11. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_addSetEntry.js
  12. 2 2
      packages/ckeditor5-utils/src/lib/lodash/_apply.js
  13. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_arrayEach.js
  14. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_arrayReduce.js
  15. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_arraySome.js
  16. 2 3
      packages/ckeditor5-utils/src/lib/lodash/_assignValue.js
  17. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_assocDelete.js
  18. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_assocGet.js
  19. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_assocHas.js
  20. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_assocIndexOf.js
  21. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_assocSet.js
  22. 2 2
      packages/ckeditor5-utils/src/lib/lodash/_baseAssign.js
  23. 29 21
      packages/ckeditor5-utils/src/lib/lodash/_baseClone.js
  24. 18 0
      packages/ckeditor5-utils/src/lib/lodash/_baseCreate.js
  25. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_baseFor.js
  26. 2 2
      packages/ckeditor5-utils/src/lib/lodash/_baseForOwn.js
  27. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_baseHas.js
  28. 3 3
      packages/ckeditor5-utils/src/lib/lodash/_baseIsEqual.js
  29. 18 23
      packages/ckeditor5-utils/src/lib/lodash/_baseIsEqualDeep.js
  30. 0 1
      packages/ckeditor5-utils/src/lib/lodash/_baseKeys.js
  31. 2 2
      packages/ckeditor5-utils/src/lib/lodash/_baseKeysIn.js
  32. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_baseProperty.js
  33. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_baseTimes.js
  34. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_checkGlobal.js
  35. 16 0
      packages/ckeditor5-utils/src/lib/lodash/_cloneArrayBuffer.js
  36. 18 0
      packages/ckeditor5-utils/src/lib/lodash/_cloneBuffer.js
  37. 16 0
      packages/ckeditor5-utils/src/lib/lodash/_cloneMap.js
  38. 1 3
      packages/ckeditor5-utils/src/lib/lodash/_cloneRegExp.js
  39. 16 0
      packages/ckeditor5-utils/src/lib/lodash/_cloneSet.js
  40. 3 3
      packages/ckeditor5-utils/src/lib/lodash/_cloneSymbol.js
  41. 3 5
      packages/ckeditor5-utils/src/lib/lodash/_cloneTypedArray.js
  42. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_copyArray.js
  43. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_copyObject.js
  44. 6 3
      packages/ckeditor5-utils/src/lib/lodash/_copyObjectWith.js
  45. 2 2
      packages/ckeditor5-utils/src/lib/lodash/_copySymbols.js
  46. 6 3
      packages/ckeditor5-utils/src/lib/lodash/_createAssigner.js
  47. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_createBaseFor.js
  48. 4 4
      packages/ckeditor5-utils/src/lib/lodash/_equalArrays.js
  49. 22 11
      packages/ckeditor5-utils/src/lib/lodash/_equalByTag.js
  50. 5 5
      packages/ckeditor5-utils/src/lib/lodash/_equalObjects.js
  51. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_getLength.js
  52. 2 2
      packages/ckeditor5-utils/src/lib/lodash/_getNative.js
  53. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_getSymbols.js
  54. 16 12
      packages/ckeditor5-utils/src/lib/lodash/_getTag.js
  55. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_hashDelete.js
  56. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_hashGet.js
  57. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_hashHas.js
  58. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_hashSet.js
  59. 10 8
      packages/ckeditor5-utils/src/lib/lodash/_indexKeys.js
  60. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_initCloneArray.js
  61. 7 7
      packages/ckeditor5-utils/src/lib/lodash/_initCloneByTag.js
  62. 20 0
      packages/ckeditor5-utils/src/lib/lodash/_initCloneObject.js
  63. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_isHostObject.js
  64. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_isIndex.js
  65. 5 5
      packages/ckeditor5-utils/src/lib/lodash/_isIterateeCall.js
  66. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_isKeyable.js
  67. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_isPrototype.js
  68. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_iteratorToArray.js
  69. 7 3
      packages/ckeditor5-utils/src/lib/lodash/_mapClear.js
  70. 4 4
      packages/ckeditor5-utils/src/lib/lodash/_mapDelete.js
  71. 4 4
      packages/ckeditor5-utils/src/lib/lodash/_mapGet.js
  72. 4 4
      packages/ckeditor5-utils/src/lib/lodash/_mapHas.js
  73. 4 4
      packages/ckeditor5-utils/src/lib/lodash/_mapSet.js
  74. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_mapToArray.js
  75. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_nativeCreate.js
  76. 10 4
      packages/ckeditor5-utils/src/lib/lodash/_root.js
  77. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_setToArray.js
  78. 0 0
      packages/ckeditor5-utils/src/lib/lodash/_stackClear.js
  79. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_stackDelete.js
  80. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_stackGet.js
  81. 1 1
      packages/ckeditor5-utils/src/lib/lodash/_stackHas.js
  82. 2 2
      packages/ckeditor5-utils/src/lib/lodash/_stackSet.js
  83. 22 4
      packages/ckeditor5-utils/src/lib/lodash/assignIn.js
  84. 3 3
      packages/ckeditor5-utils/src/lib/lodash/clone.js
  85. 23 0
      packages/ckeditor5-utils/src/lib/lodash/constant.js
  86. 0 23
      packages/ckeditor5-utils/src/lib/lodash/internal/baseCreate.js
  87. 0 19
      packages/ckeditor5-utils/src/lib/lodash/internal/cloneBuffer.js
  88. 0 17
      packages/ckeditor5-utils/src/lib/lodash/internal/cloneMap.js
  89. 0 17
      packages/ckeditor5-utils/src/lib/lodash/internal/cloneSet.js
  90. 0 16
      packages/ckeditor5-utils/src/lib/lodash/internal/initCloneObject.js
  91. 2 2
      packages/ckeditor5-utils/src/lib/lodash/isArray.js
  92. 2 4
      packages/ckeditor5-utils/src/lib/lodash/isArrayLike.js
  93. 0 1
      packages/ckeditor5-utils/src/lib/lodash/isArrayLikeObject.js
  94. 48 0
      packages/ckeditor5-utils/src/lib/lodash/isBuffer.js
  95. 2 2
      packages/ckeditor5-utils/src/lib/lodash/isEqual.js
  96. 2 2
      packages/ckeditor5-utils/src/lib/lodash/isFunction.js
  97. 2 1
      packages/ckeditor5-utils/src/lib/lodash/isLength.js
  98. 1 1
      packages/ckeditor5-utils/src/lib/lodash/isNative.js
  99. 1 3
      packages/ckeditor5-utils/src/lib/lodash/isObject.js
  100. 5 7
      packages/ckeditor5-utils/src/lib/lodash/isPlainObject.js

+ 2 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/Hash.js → packages/ckeditor5-utils/src/lib/lodash/_Hash.js

@@ -1,4 +1,4 @@
-import nativeCreate from './nativeCreate';
+import nativeCreate from './_nativeCreate';
 
 /** Used for built-in method references. */
 var objectProto = Object.prototype;
@@ -7,6 +7,7 @@ var objectProto = Object.prototype;
  * Creates an hash object.
  *
  * @private
+ * @constructor
  * @returns {Object} Returns the new hash object.
  */
 function Hash() {}

+ 2 - 2
packages/ckeditor5-utils/src/lib/lodash/internal/Map.js → packages/ckeditor5-utils/src/lib/lodash/_Map.js

@@ -1,5 +1,5 @@
-import getNative from './getNative';
-import root from './root';
+import getNative from './_getNative';
+import root from './_root';
 
 /* Built-in method references that are verified to be native. */
 var Map = getNative(root, 'Map');

+ 6 - 5
packages/ckeditor5-utils/src/lib/lodash/internal/MapCache.js → packages/ckeditor5-utils/src/lib/lodash/_MapCache.js

@@ -1,13 +1,14 @@
-import mapClear from './mapClear';
-import mapDelete from './mapDelete';
-import mapGet from './mapGet';
-import mapHas from './mapHas';
-import mapSet from './mapSet';
+import mapClear from './_mapClear';
+import mapDelete from './_mapDelete';
+import mapGet from './_mapGet';
+import mapHas from './_mapHas';
+import mapSet from './_mapSet';
 
 /**
  * Creates a map cache object to store key-value pairs.
  *
  * @private
+ * @constructor
  * @param {Array} [values] The values to cache.
  */
 function MapCache(values) {

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/Reflect.js → packages/ckeditor5-utils/src/lib/lodash/_Reflect.js

@@ -1,4 +1,4 @@
-import root from './root';
+import root from './_root';
 
 /** Built-in value references. */
 var Reflect = root.Reflect;

+ 2 - 2
packages/ckeditor5-utils/src/lib/lodash/internal/Set.js → packages/ckeditor5-utils/src/lib/lodash/_Set.js

@@ -1,5 +1,5 @@
-import getNative from './getNative';
-import root from './root';
+import getNative from './_getNative';
+import root from './_root';
 
 /* Built-in method references that are verified to be native. */
 var Set = getNative(root, 'Set');

+ 6 - 5
packages/ckeditor5-utils/src/lib/lodash/internal/Stack.js → packages/ckeditor5-utils/src/lib/lodash/_Stack.js

@@ -1,13 +1,14 @@
-import stackClear from './stackClear';
-import stackDelete from './stackDelete';
-import stackGet from './stackGet';
-import stackHas from './stackHas';
-import stackSet from './stackSet';
+import stackClear from './_stackClear';
+import stackDelete from './_stackDelete';
+import stackGet from './_stackGet';
+import stackHas from './_stackHas';
+import stackSet from './_stackSet';
 
 /**
  * Creates a stack cache object to store key-value pairs.
  *
  * @private
+ * @constructor
  * @param {Array} [values] The values to cache.
  */
 function Stack(values) {

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/Symbol.js → packages/ckeditor5-utils/src/lib/lodash/_Symbol.js

@@ -1,4 +1,4 @@
-import root from './root';
+import root from './_root';
 
 /** Built-in value references. */
 var Symbol = root.Symbol;

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/Uint8Array.js → packages/ckeditor5-utils/src/lib/lodash/_Uint8Array.js

@@ -1,4 +1,4 @@
-import root from './root';
+import root from './_root';
 
 /** Built-in value references. */
 var Uint8Array = root.Uint8Array;

+ 7 - 0
packages/ckeditor5-utils/src/lib/lodash/_WeakMap.js

@@ -0,0 +1,7 @@
+import getNative from './_getNative';
+import root from './_root';
+
+/* Built-in method references that are verified to be native. */
+var WeakMap = getNative(root, 'WeakMap');
+
+export default WeakMap;

+ 1 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/addMapEntry.js → packages/ckeditor5-utils/src/lib/lodash/_addMapEntry.js

@@ -7,6 +7,7 @@
  * @returns {Object} Returns `map`.
  */
 function addMapEntry(map, pair) {
+  // Don't return `Map#set` because it doesn't return the map instance in IE 11.
   map.set(pair[0], pair[1]);
   return map;
 }

+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/addSetEntry.js → packages/ckeditor5-utils/src/lib/lodash/_addSetEntry.js


+ 2 - 2
packages/ckeditor5-utils/src/lib/lodash/internal/apply.js → packages/ckeditor5-utils/src/lib/lodash/_apply.js

@@ -5,11 +5,11 @@
  * @private
  * @param {Function} func The function to invoke.
  * @param {*} thisArg The `this` binding of `func`.
- * @param {...*} [args] The arguments to invoke `func` with.
+ * @param {...*} args The arguments to invoke `func` with.
  * @returns {*} Returns the result of `func`.
  */
 function apply(func, thisArg, args) {
-  var length = args ? args.length : 0;
+  var length = args.length;
   switch (length) {
     case 0: return func.call(thisArg);
     case 1: return func.call(thisArg, args[0]);

+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/arrayEach.js → packages/ckeditor5-utils/src/lib/lodash/_arrayEach.js


+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/arrayReduce.js → packages/ckeditor5-utils/src/lib/lodash/_arrayReduce.js


+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/arraySome.js → packages/ckeditor5-utils/src/lib/lodash/_arraySome.js


+ 2 - 3
packages/ckeditor5-utils/src/lib/lodash/internal/assignValue.js → packages/ckeditor5-utils/src/lib/lodash/_assignValue.js

@@ -1,4 +1,4 @@
-import eq from '../eq';
+import eq from './eq';
 
 /** Used for built-in method references. */
 var objectProto = Object.prototype;
@@ -18,8 +18,7 @@ var hasOwnProperty = objectProto.hasOwnProperty;
  */
 function assignValue(object, key, value) {
   var objValue = object[key];
-  if ((!eq(objValue, value) ||
-        (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) ||
+  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
       (value === undefined && !(key in object))) {
     object[key] = value;
   }

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/assocDelete.js → packages/ckeditor5-utils/src/lib/lodash/_assocDelete.js

@@ -1,4 +1,4 @@
-import assocIndexOf from './assocIndexOf';
+import assocIndexOf from './_assocIndexOf';
 
 /** Used for built-in method references. */
 var arrayProto = Array.prototype;

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/assocGet.js → packages/ckeditor5-utils/src/lib/lodash/_assocGet.js

@@ -1,4 +1,4 @@
-import assocIndexOf from './assocIndexOf';
+import assocIndexOf from './_assocIndexOf';
 
 /**
  * Gets the associative array value for `key`.

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/assocHas.js → packages/ckeditor5-utils/src/lib/lodash/_assocHas.js

@@ -1,4 +1,4 @@
-import assocIndexOf from './assocIndexOf';
+import assocIndexOf from './_assocIndexOf';
 
 /**
  * Checks if an associative array value for `key` exists.

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/assocIndexOf.js → packages/ckeditor5-utils/src/lib/lodash/_assocIndexOf.js

@@ -1,4 +1,4 @@
-import eq from '../eq';
+import eq from './eq';
 
 /**
  * Gets the index at which the first occurrence of `key` is found in `array`

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/assocSet.js → packages/ckeditor5-utils/src/lib/lodash/_assocSet.js

@@ -1,4 +1,4 @@
-import assocIndexOf from './assocIndexOf';
+import assocIndexOf from './_assocIndexOf';
 
 /**
  * Sets the associative array `key` to `value`.

+ 2 - 2
packages/ckeditor5-utils/src/lib/lodash/internal/baseAssign.js → packages/ckeditor5-utils/src/lib/lodash/_baseAssign.js

@@ -1,5 +1,5 @@
-import copyObject from './copyObject';
-import keys from '../keys';
+import copyObject from './_copyObject';
+import keys from './keys';
 
 /**
  * The base implementation of `_.assign` without support for multiple sources

+ 29 - 21
packages/ckeditor5-utils/src/lib/lodash/internal/baseClone.js → packages/ckeditor5-utils/src/lib/lodash/_baseClone.js

@@ -1,17 +1,19 @@
-import Stack from './Stack';
-import arrayEach from './arrayEach';
-import assignValue from './assignValue';
-import baseAssign from './baseAssign';
-import baseForOwn from './baseForOwn';
-import copyArray from './copyArray';
-import copySymbols from './copySymbols';
-import getTag from './getTag';
-import initCloneArray from './initCloneArray';
-import initCloneByTag from './initCloneByTag';
-import initCloneObject from './initCloneObject';
-import isArray from '../isArray';
-import isHostObject from './isHostObject';
-import isObject from '../isObject';
+import Stack from './_Stack';
+import arrayEach from './_arrayEach';
+import assignValue from './_assignValue';
+import baseAssign from './_baseAssign';
+import baseForOwn from './_baseForOwn';
+import cloneBuffer from './_cloneBuffer';
+import copyArray from './_copyArray';
+import copySymbols from './_copySymbols';
+import getTag from './_getTag';
+import initCloneArray from './_initCloneArray';
+import initCloneByTag from './_initCloneByTag';
+import initCloneObject from './_initCloneObject';
+import isArray from './isArray';
+import isBuffer from './isBuffer';
+import isHostObject from './_isHostObject';
+import isObject from './isObject';
 
 /** `Object#toString` result references. */
 var argsTag = '[object Arguments]',
@@ -64,13 +66,14 @@ cloneableTags[weakMapTag] = false;
  * @private
  * @param {*} value The value to clone.
  * @param {boolean} [isDeep] Specify a deep clone.
+ * @param {boolean} [isFull] Specify a clone including symbols.
  * @param {Function} [customizer] The function to customize cloning.
  * @param {string} [key] The key of `value`.
  * @param {Object} [object] The parent object of `value`.
  * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  * @returns {*} Returns the cloned value.
  */
-function baseClone(value, isDeep, customizer, key, object, stack) {
+function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
   var result;
   if (customizer) {
     result = object ? customizer(value, key, object, stack) : customizer(value);
@@ -91,18 +94,23 @@ function baseClone(value, isDeep, customizer, key, object, stack) {
     var tag = getTag(value),
         isFunc = tag == funcTag || tag == genTag;
 
+    if (isBuffer(value)) {
+      return cloneBuffer(value, isDeep);
+    }
     if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
       if (isHostObject(value)) {
         return object ? value : {};
       }
       result = initCloneObject(isFunc ? {} : value);
       if (!isDeep) {
-        return copySymbols(value, baseAssign(result, value));
+        result = baseAssign(result, value);
+        return isFull ? copySymbols(value, result) : result;
       }
     } else {
-      return cloneableTags[tag]
-        ? initCloneByTag(value, tag, isDeep)
-        : (object ? value : {});
+      if (!cloneableTags[tag]) {
+        return object ? value : {};
+      }
+      result = initCloneByTag(value, tag, isDeep);
     }
   }
   // Check for circular references and return its corresponding clone.
@@ -115,9 +123,9 @@ function baseClone(value, isDeep, customizer, key, object, stack) {
 
   // Recursively populate clone (susceptible to call stack limits).
   (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
-    assignValue(result, key, baseClone(subValue, isDeep, customizer, key, value, stack));
+    assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
   });
-  return isArr ? result : copySymbols(value, result);
+  return (isFull && !isArr) ? copySymbols(value, result) : result;
 }
 
 export default baseClone;

+ 18 - 0
packages/ckeditor5-utils/src/lib/lodash/_baseCreate.js

@@ -0,0 +1,18 @@
+import isObject from './isObject';
+
+/** Built-in value references. */
+var objectCreate = Object.create;
+
+/**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} prototype The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+function baseCreate(proto) {
+  return isObject(proto) ? objectCreate(proto) : {};
+}
+
+export default baseCreate;

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/baseFor.js → packages/ckeditor5-utils/src/lib/lodash/_baseFor.js

@@ -1,4 +1,4 @@
-import createBaseFor from './createBaseFor';
+import createBaseFor from './_createBaseFor';
 
 /**
  * The base implementation of `baseForIn` and `baseForOwn` which iterates

+ 2 - 2
packages/ckeditor5-utils/src/lib/lodash/internal/baseForOwn.js → packages/ckeditor5-utils/src/lib/lodash/_baseForOwn.js

@@ -1,5 +1,5 @@
-import baseFor from './baseFor';
-import keys from '../keys';
+import baseFor from './_baseFor';
+import keys from './keys';
 
 /**
  * The base implementation of `_.forOwn` without support for iteratee shorthands.

+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/baseHas.js → packages/ckeditor5-utils/src/lib/lodash/_baseHas.js


+ 3 - 3
packages/ckeditor5-utils/src/lib/lodash/internal/baseIsEqual.js → packages/ckeditor5-utils/src/lib/lodash/_baseIsEqual.js

@@ -1,6 +1,6 @@
-import baseIsEqualDeep from './baseIsEqualDeep';
-import isObject from '../isObject';
-import isObjectLike from '../isObjectLike';
+import baseIsEqualDeep from './_baseIsEqualDeep';
+import isObject from './isObject';
+import isObjectLike from './isObjectLike';
 
 /**
  * The base implementation of `_.isEqual` which supports partial comparisons

+ 18 - 23
packages/ckeditor5-utils/src/lib/lodash/internal/baseIsEqualDeep.js → packages/ckeditor5-utils/src/lib/lodash/_baseIsEqualDeep.js

@@ -1,11 +1,11 @@
-import Stack from './Stack';
-import equalArrays from './equalArrays';
-import equalByTag from './equalByTag';
-import equalObjects from './equalObjects';
-import getTag from './getTag';
-import isArray from '../isArray';
-import isHostObject from './isHostObject';
-import isTypedArray from '../isTypedArray';
+import Stack from './_Stack';
+import equalArrays from './_equalArrays';
+import equalByTag from './_equalByTag';
+import equalObjects from './_equalObjects';
+import getTag from './_getTag';
+import isArray from './isArray';
+import isHostObject from './_isHostObject';
+import isTypedArray from './isTypedArray';
 
 /** Used to compose bitmasks for comparison styles. */
 var PARTIAL_COMPARE_FLAG = 2;
@@ -43,33 +43,28 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
 
   if (!objIsArr) {
     objTag = getTag(object);
-    if (objTag == argsTag) {
-      objTag = objectTag;
-    } else if (objTag != objectTag) {
-      objIsArr = isTypedArray(object);
-    }
+    objTag = objTag == argsTag ? objectTag : objTag;
   }
   if (!othIsArr) {
     othTag = getTag(other);
-    if (othTag == argsTag) {
-      othTag = objectTag;
-    } else if (othTag != objectTag) {
-      othIsArr = isTypedArray(other);
-    }
+    othTag = othTag == argsTag ? objectTag : othTag;
   }
   var objIsObj = objTag == objectTag && !isHostObject(object),
       othIsObj = othTag == objectTag && !isHostObject(other),
       isSameTag = objTag == othTag;
 
-  if (isSameTag && !(objIsArr || objIsObj)) {
-    return equalByTag(object, other, objTag, equalFunc, customizer, bitmask);
+  if (isSameTag && !objIsObj) {
+    stack || (stack = new Stack);
+    return (objIsArr || isTypedArray(object))
+      ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
+      : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
   }
-  var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
-  if (!isPartial) {
+  if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
     var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
         othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
 
     if (objIsWrapped || othIsWrapped) {
+      stack || (stack = new Stack);
       return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack);
     }
   }
@@ -77,7 +72,7 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
     return false;
   }
   stack || (stack = new Stack);
-  return (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, bitmask, stack);
+  return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
 }
 
 export default baseIsEqualDeep;

+ 0 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/baseKeys.js → packages/ckeditor5-utils/src/lib/lodash/_baseKeys.js

@@ -6,7 +6,6 @@ var nativeKeys = Object.keys;
  * property of prototypes or treat sparse arrays as dense.
  *
  * @private
- * @type Function
  * @param {Object} object The object to query.
  * @returns {Array} Returns the array of property names.
  */

+ 2 - 2
packages/ckeditor5-utils/src/lib/lodash/internal/baseKeysIn.js → packages/ckeditor5-utils/src/lib/lodash/_baseKeysIn.js

@@ -1,5 +1,5 @@
-import Reflect from './Reflect';
-import iteratorToArray from './iteratorToArray';
+import Reflect from './_Reflect';
+import iteratorToArray from './_iteratorToArray';
 
 /** Used for built-in method references. */
 var objectProto = Object.prototype;

+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/baseProperty.js → packages/ckeditor5-utils/src/lib/lodash/_baseProperty.js


+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/baseTimes.js → packages/ckeditor5-utils/src/lib/lodash/_baseTimes.js


+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/checkGlobal.js → packages/ckeditor5-utils/src/lib/lodash/_checkGlobal.js


+ 16 - 0
packages/ckeditor5-utils/src/lib/lodash/_cloneArrayBuffer.js

@@ -0,0 +1,16 @@
+import Uint8Array from './_Uint8Array';
+
+/**
+ * Creates a clone of `arrayBuffer`.
+ *
+ * @private
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+function cloneArrayBuffer(arrayBuffer) {
+  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+  new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+  return result;
+}
+
+export default cloneArrayBuffer;

+ 18 - 0
packages/ckeditor5-utils/src/lib/lodash/_cloneBuffer.js

@@ -0,0 +1,18 @@
+/**
+ * Creates a clone of  `buffer`.
+ *
+ * @private
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
+ */
+function cloneBuffer(buffer, isDeep) {
+  if (isDeep) {
+    return buffer.slice();
+  }
+  var result = new buffer.constructor(buffer.length);
+  buffer.copy(result);
+  return result;
+}
+
+export default cloneBuffer;

+ 16 - 0
packages/ckeditor5-utils/src/lib/lodash/_cloneMap.js

@@ -0,0 +1,16 @@
+import addMapEntry from './_addMapEntry';
+import arrayReduce from './_arrayReduce';
+import mapToArray from './_mapToArray';
+
+/**
+ * Creates a clone of `map`.
+ *
+ * @private
+ * @param {Object} map The map to clone.
+ * @returns {Object} Returns the cloned map.
+ */
+function cloneMap(map) {
+  return arrayReduce(mapToArray(map), addMapEntry, new map.constructor);
+}
+
+export default cloneMap;

+ 1 - 3
packages/ckeditor5-utils/src/lib/lodash/internal/cloneRegExp.js → packages/ckeditor5-utils/src/lib/lodash/_cloneRegExp.js

@@ -9,9 +9,7 @@ var reFlags = /\w*$/;
  * @returns {Object} Returns the cloned regexp.
  */
 function cloneRegExp(regexp) {
-  var Ctor = regexp.constructor,
-      result = new Ctor(regexp.source, reFlags.exec(regexp));
-
+  var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
   result.lastIndex = regexp.lastIndex;
   return result;
 }

+ 16 - 0
packages/ckeditor5-utils/src/lib/lodash/_cloneSet.js

@@ -0,0 +1,16 @@
+import addSetEntry from './_addSetEntry';
+import arrayReduce from './_arrayReduce';
+import setToArray from './_setToArray';
+
+/**
+ * Creates a clone of `set`.
+ *
+ * @private
+ * @param {Object} set The set to clone.
+ * @returns {Object} Returns the cloned set.
+ */
+function cloneSet(set) {
+  return arrayReduce(setToArray(set), addSetEntry, new set.constructor);
+}
+
+export default cloneSet;

+ 3 - 3
packages/ckeditor5-utils/src/lib/lodash/internal/cloneSymbol.js → packages/ckeditor5-utils/src/lib/lodash/_cloneSymbol.js

@@ -1,8 +1,8 @@
-import Symbol from './Symbol';
+import Symbol from './_Symbol';
 
 /** Used to convert symbols to primitives and strings. */
 var symbolProto = Symbol ? Symbol.prototype : undefined,
-    symbolValueOf = Symbol ? symbolProto.valueOf : undefined;
+    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
 
 /**
  * Creates a clone of the `symbol` object.
@@ -12,7 +12,7 @@ var symbolProto = Symbol ? Symbol.prototype : undefined,
  * @returns {Object} Returns the cloned symbol object.
  */
 function cloneSymbol(symbol) {
-  return Symbol ? Object(symbolValueOf.call(symbol)) : {};
+  return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
 }
 
 export default cloneSymbol;

+ 3 - 5
packages/ckeditor5-utils/src/lib/lodash/internal/cloneTypedArray.js → packages/ckeditor5-utils/src/lib/lodash/_cloneTypedArray.js

@@ -1,4 +1,4 @@
-import cloneBuffer from './cloneBuffer';
+import cloneArrayBuffer from './_cloneArrayBuffer';
 
 /**
  * Creates a clone of `typedArray`.
@@ -9,10 +9,8 @@ import cloneBuffer from './cloneBuffer';
  * @returns {Object} Returns the cloned typed array.
  */
 function cloneTypedArray(typedArray, isDeep) {
-  var buffer = typedArray.buffer,
-      Ctor = typedArray.constructor;
-
-  return new Ctor(isDeep ? cloneBuffer(buffer) : buffer, typedArray.byteOffset, typedArray.length);
+  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
 }
 
 export default cloneTypedArray;

+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/copyArray.js → packages/ckeditor5-utils/src/lib/lodash/_copyArray.js


+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/copyObject.js → packages/ckeditor5-utils/src/lib/lodash/_copyObject.js

@@ -1,4 +1,4 @@
-import copyObjectWith from './copyObjectWith';
+import copyObjectWith from './_copyObjectWith';
 
 /**
  * Copies properties of `source` to `object`.

+ 6 - 3
packages/ckeditor5-utils/src/lib/lodash/internal/copyObjectWith.js → packages/ckeditor5-utils/src/lib/lodash/_copyObjectWith.js

@@ -1,4 +1,4 @@
-import assignValue from './assignValue';
+import assignValue from './_assignValue';
 
 /**
  * This function is like `copyObject` except that it accepts a function to
@@ -18,8 +18,11 @@ function copyObjectWith(source, props, object, customizer) {
       length = props.length;
 
   while (++index < length) {
-    var key = props[index],
-        newValue = customizer ? customizer(object[key], source[key], key, object, source) : source[key];
+    var key = props[index];
+
+    var newValue = customizer
+      ? customizer(object[key], source[key], key, object, source)
+      : source[key];
 
     assignValue(object, key, newValue);
   }

+ 2 - 2
packages/ckeditor5-utils/src/lib/lodash/internal/copySymbols.js → packages/ckeditor5-utils/src/lib/lodash/_copySymbols.js

@@ -1,5 +1,5 @@
-import copyObject from './copyObject';
-import getSymbols from './getSymbols';
+import copyObject from './_copyObject';
+import getSymbols from './_getSymbols';
 
 /**
  * Copies own symbol properties of `source` to `object`.

+ 6 - 3
packages/ckeditor5-utils/src/lib/lodash/internal/createAssigner.js → packages/ckeditor5-utils/src/lib/lodash/_createAssigner.js

@@ -1,5 +1,5 @@
-import isIterateeCall from './isIterateeCall';
-import rest from '../rest';
+import isIterateeCall from './_isIterateeCall';
+import rest from './rest';
 
 /**
  * Creates a function like `_.assign`.
@@ -15,7 +15,10 @@ function createAssigner(assigner) {
         customizer = length > 1 ? sources[length - 1] : undefined,
         guard = length > 2 ? sources[2] : undefined;
 
-    customizer = typeof customizer == 'function' ? (length--, customizer) : undefined;
+    customizer = typeof customizer == 'function'
+      ? (length--, customizer)
+      : undefined;
+
     if (guard && isIterateeCall(sources[0], sources[1], guard)) {
       customizer = length < 3 ? undefined : customizer;
       length = 1;

+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/createBaseFor.js → packages/ckeditor5-utils/src/lib/lodash/_createBaseFor.js


+ 4 - 4
packages/ckeditor5-utils/src/lib/lodash/internal/equalArrays.js → packages/ckeditor5-utils/src/lib/lodash/_equalArrays.js

@@ -1,4 +1,4 @@
-import arraySome from './arraySome';
+import arraySome from './_arraySome';
 
 /** Used to compose bitmasks for comparison styles. */
 var UNORDERED_COMPARE_FLAG = 1,
@@ -12,9 +12,9 @@ var UNORDERED_COMPARE_FLAG = 1,
  * @param {Array} array The array to compare.
  * @param {Array} other The other array to compare.
  * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
- * @param {Object} [stack] Tracks traversed `array` and `other` objects.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
  * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  */
 function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {

+ 22 - 11
packages/ckeditor5-utils/src/lib/lodash/internal/equalByTag.js → packages/ckeditor5-utils/src/lib/lodash/_equalByTag.js

@@ -1,7 +1,8 @@
-import Symbol from './Symbol';
-import Uint8Array from './Uint8Array';
-import mapToArray from './mapToArray';
-import setToArray from './setToArray';
+import Symbol from './_Symbol';
+import Uint8Array from './_Uint8Array';
+import equalArrays from './_equalArrays';
+import mapToArray from './_mapToArray';
+import setToArray from './_setToArray';
 
 /** Used to compose bitmasks for comparison styles. */
 var UNORDERED_COMPARE_FLAG = 1,
@@ -22,7 +23,7 @@ var arrayBufferTag = '[object ArrayBuffer]';
 
 /** Used to convert symbols to primitives and strings. */
 var symbolProto = Symbol ? Symbol.prototype : undefined,
-    symbolValueOf = Symbol ? symbolProto.valueOf : undefined;
+    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
 
 /**
  * A specialized version of `baseIsEqualDeep` for comparing objects of
@@ -36,11 +37,12 @@ var symbolProto = Symbol ? Symbol.prototype : undefined,
  * @param {Object} other The other object to compare.
  * @param {string} tag The `toStringTag` of the objects to compare.
  * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
  * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  */
-function equalByTag(object, other, tag, equalFunc, customizer, bitmask) {
+function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
   switch (tag) {
     case arrayBufferTag:
       if ((object.byteLength != other.byteLength) ||
@@ -75,12 +77,21 @@ function equalByTag(object, other, tag, equalFunc, customizer, bitmask) {
       var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
       convert || (convert = setToArray);
 
+      if (object.size != other.size && !isPartial) {
+        return false;
+      }
+      // Assume cyclic values are equal.
+      var stacked = stack.get(object);
+      if (stacked) {
+        return stacked == other;
+      }
       // Recursively compare objects (susceptible to call stack limits).
-      return (isPartial || object.size == other.size) &&
-        equalFunc(convert(object), convert(other), customizer, bitmask | UNORDERED_COMPARE_FLAG);
+      return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask | UNORDERED_COMPARE_FLAG, stack.set(object, other));
 
     case symbolTag:
-      return !!Symbol && (symbolValueOf.call(object) == symbolValueOf.call(other));
+      if (symbolValueOf) {
+        return symbolValueOf.call(object) == symbolValueOf.call(other);
+      }
   }
   return false;
 }

+ 5 - 5
packages/ckeditor5-utils/src/lib/lodash/internal/equalObjects.js → packages/ckeditor5-utils/src/lib/lodash/_equalObjects.js

@@ -1,5 +1,5 @@
-import baseHas from './baseHas';
-import keys from '../keys';
+import baseHas from './_baseHas';
+import keys from './keys';
 
 /** Used to compose bitmasks for comparison styles. */
 var PARTIAL_COMPARE_FLAG = 2;
@@ -12,9 +12,9 @@ var PARTIAL_COMPARE_FLAG = 2;
  * @param {Object} object The object to compare.
  * @param {Object} other The other object to compare.
  * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` for more details.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
  * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  */
 function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/getLength.js → packages/ckeditor5-utils/src/lib/lodash/_getLength.js

@@ -1,4 +1,4 @@
-import baseProperty from './baseProperty';
+import baseProperty from './_baseProperty';
 
 /**
  * Gets the "length" property value of `object`.

+ 2 - 2
packages/ckeditor5-utils/src/lib/lodash/internal/getNative.js → packages/ckeditor5-utils/src/lib/lodash/_getNative.js

@@ -1,4 +1,4 @@
-import isNative from '../isNative';
+import isNative from './isNative';
 
 /**
  * Gets the native function at `key` of `object`.
@@ -9,7 +9,7 @@ import isNative from '../isNative';
  * @returns {*} Returns the function if it's native, else `undefined`.
  */
 function getNative(object, key) {
-  var value = object == null ? undefined : object[key];
+  var value = object[key];
   return isNative(value) ? value : undefined;
 }
 

+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/getSymbols.js → packages/ckeditor5-utils/src/lib/lodash/_getSymbols.js


+ 16 - 12
packages/ckeditor5-utils/src/lib/lodash/internal/getTag.js → packages/ckeditor5-utils/src/lib/lodash/_getTag.js

@@ -1,10 +1,12 @@
-import Map from './Map';
-import Set from './Set';
+import Map from './_Map';
+import Set from './_Set';
+import WeakMap from './_WeakMap';
 
 /** `Object#toString` result references. */
 var mapTag = '[object Map]',
     objectTag = '[object Object]',
-    setTag = '[object Set]';
+    setTag = '[object Set]',
+    weakMapTag = '[object WeakMap]';
 
 /** Used for built-in method references. */
 var objectProto = Object.prototype;
@@ -18,9 +20,10 @@ var funcToString = Function.prototype.toString;
  */
 var objectToString = objectProto.toString;
 
-/** Used to detect maps and sets. */
+/** Used to detect maps, sets, and weakmaps. */
 var mapCtorString = Map ? funcToString.call(Map) : '',
-    setCtorString = Set ? funcToString.call(Set) : '';
+    setCtorString = Set ? funcToString.call(Set) : '',
+    weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : '';
 
 /**
  * Gets the `toStringTag` of `value`.
@@ -33,19 +36,20 @@ function getTag(value) {
   return objectToString.call(value);
 }
 
-// Fallback for IE 11 providing `toStringTag` values for maps and sets.
-if ((Map && getTag(new Map) != mapTag) || (Set && getTag(new Set) != setTag)) {
+// Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps.
+if ((Map && getTag(new Map) != mapTag) ||
+    (Set && getTag(new Set) != setTag) ||
+    (WeakMap && getTag(new WeakMap) != weakMapTag)) {
   getTag = function(value) {
     var result = objectToString.call(value),
         Ctor = result == objectTag ? value.constructor : null,
         ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : '';
 
     if (ctorString) {
-      if (ctorString == mapCtorString) {
-        return mapTag;
-      }
-      if (ctorString == setCtorString) {
-        return setTag;
+      switch (ctorString) {
+        case mapCtorString: return mapTag;
+        case setCtorString: return setTag;
+        case weakMapCtorString: return weakMapTag;
       }
     }
     return result;

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/hashDelete.js → packages/ckeditor5-utils/src/lib/lodash/_hashDelete.js

@@ -1,4 +1,4 @@
-import hashHas from './hashHas';
+import hashHas from './_hashHas';
 
 /**
  * Removes `key` and its value from the hash.

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/hashGet.js → packages/ckeditor5-utils/src/lib/lodash/_hashGet.js

@@ -1,4 +1,4 @@
-import nativeCreate from './nativeCreate';
+import nativeCreate from './_nativeCreate';
 
 /** Used to stand-in for `undefined` hash values. */
 var HASH_UNDEFINED = '__lodash_hash_undefined__';

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/hashHas.js → packages/ckeditor5-utils/src/lib/lodash/_hashHas.js

@@ -1,4 +1,4 @@
-import nativeCreate from './nativeCreate';
+import nativeCreate from './_nativeCreate';
 
 /** Used for built-in method references. */
 var objectProto = Object.prototype;

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/hashSet.js → packages/ckeditor5-utils/src/lib/lodash/_hashSet.js

@@ -1,4 +1,4 @@
-import nativeCreate from './nativeCreate';
+import nativeCreate from './_nativeCreate';
 
 /** Used to stand-in for `undefined` hash values. */
 var HASH_UNDEFINED = '__lodash_hash_undefined__';

+ 10 - 8
packages/ckeditor5-utils/src/lib/lodash/internal/indexKeys.js → packages/ckeditor5-utils/src/lib/lodash/_indexKeys.js

@@ -1,8 +1,8 @@
-import baseTimes from './baseTimes';
-import isArguments from '../isArguments';
-import isArray from '../isArray';
-import isLength from '../isLength';
-import isString from '../isString';
+import baseTimes from './_baseTimes';
+import isArguments from './isArguments';
+import isArray from './isArray';
+import isLength from './isLength';
+import isString from './isString';
 
 /**
  * Creates an array of index keys for `object` values of arrays,
@@ -14,9 +14,11 @@ import isString from '../isString';
  */
 function indexKeys(object) {
   var length = object ? object.length : undefined;
-  return (isLength(length) && (isArray(object) || isString(object) || isArguments(object)))
-    ? baseTimes(length, String)
-    : null;
+  if (isLength(length) &&
+      (isArray(object) || isString(object) || isArguments(object))) {
+    return baseTimes(length, String);
+  }
+  return null;
 }
 
 export default indexKeys;

+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/initCloneArray.js → packages/ckeditor5-utils/src/lib/lodash/_initCloneArray.js


+ 7 - 7
packages/ckeditor5-utils/src/lib/lodash/internal/initCloneByTag.js → packages/ckeditor5-utils/src/lib/lodash/_initCloneByTag.js

@@ -1,9 +1,9 @@
-import cloneBuffer from './cloneBuffer';
-import cloneMap from './cloneMap';
-import cloneRegExp from './cloneRegExp';
-import cloneSet from './cloneSet';
-import cloneSymbol from './cloneSymbol';
-import cloneTypedArray from './cloneTypedArray';
+import cloneArrayBuffer from './_cloneArrayBuffer';
+import cloneMap from './_cloneMap';
+import cloneRegExp from './_cloneRegExp';
+import cloneSet from './_cloneSet';
+import cloneSymbol from './_cloneSymbol';
+import cloneTypedArray from './_cloneTypedArray';
 
 /** `Object#toString` result references. */
 var boolTag = '[object Boolean]',
@@ -42,7 +42,7 @@ function initCloneByTag(object, tag, isDeep) {
   var Ctor = object.constructor;
   switch (tag) {
     case arrayBufferTag:
-      return cloneBuffer(object);
+      return cloneArrayBuffer(object);
 
     case boolTag:
     case dateTag:

+ 20 - 0
packages/ckeditor5-utils/src/lib/lodash/_initCloneObject.js

@@ -0,0 +1,20 @@
+import baseCreate from './_baseCreate';
+import isPrototype from './_isPrototype';
+
+/** Built-in value references. */
+var getPrototypeOf = Object.getPrototypeOf;
+
+/**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+function initCloneObject(object) {
+  return (typeof object.constructor == 'function' && !isPrototype(object))
+    ? baseCreate(getPrototypeOf(object))
+    : {};
+}
+
+export default initCloneObject;

+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/isHostObject.js → packages/ckeditor5-utils/src/lib/lodash/_isHostObject.js


+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/isIndex.js → packages/ckeditor5-utils/src/lib/lodash/_isIndex.js


+ 5 - 5
packages/ckeditor5-utils/src/lib/lodash/internal/isIterateeCall.js → packages/ckeditor5-utils/src/lib/lodash/_isIterateeCall.js

@@ -1,10 +1,10 @@
-import eq from '../eq';
-import isArrayLike from '../isArrayLike';
-import isIndex from './isIndex';
-import isObject from '../isObject';
+import eq from './eq';
+import isArrayLike from './isArrayLike';
+import isIndex from './_isIndex';
+import isObject from './isObject';
 
 /**
- * Checks if the provided arguments are from an iteratee call.
+ * Checks if the given arguments are from an iteratee call.
  *
  * @private
  * @param {*} value The potential iteratee value argument.

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/isKeyable.js → packages/ckeditor5-utils/src/lib/lodash/_isKeyable.js

@@ -8,7 +8,7 @@
 function isKeyable(value) {
   var type = typeof value;
   return type == 'number' || type == 'boolean' ||
-    (type == 'string' && value !== '__proto__') || value == null;
+    (type == 'string' && value != '__proto__') || value == null;
 }
 
 export default isKeyable;

+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/isPrototype.js → packages/ckeditor5-utils/src/lib/lodash/_isPrototype.js


+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/iteratorToArray.js → packages/ckeditor5-utils/src/lib/lodash/_iteratorToArray.js


+ 7 - 3
packages/ckeditor5-utils/src/lib/lodash/internal/mapClear.js → packages/ckeditor5-utils/src/lib/lodash/_mapClear.js

@@ -1,5 +1,5 @@
-import Hash from './Hash';
-import Map from './Map';
+import Hash from './_Hash';
+import Map from './_Map';
 
 /**
  * Removes all key-value entries from the map.
@@ -9,7 +9,11 @@ import Map from './Map';
  * @memberOf MapCache
  */
 function mapClear() {
-  this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };
+  this.__data__ = {
+    'hash': new Hash,
+    'map': Map ? new Map : [],
+    'string': new Hash
+  };
 }
 
 export default mapClear;

+ 4 - 4
packages/ckeditor5-utils/src/lib/lodash/internal/mapDelete.js → packages/ckeditor5-utils/src/lib/lodash/_mapDelete.js

@@ -1,7 +1,7 @@
-import Map from './Map';
-import assocDelete from './assocDelete';
-import hashDelete from './hashDelete';
-import isKeyable from './isKeyable';
+import Map from './_Map';
+import assocDelete from './_assocDelete';
+import hashDelete from './_hashDelete';
+import isKeyable from './_isKeyable';
 
 /**
  * Removes `key` and its value from the map.

+ 4 - 4
packages/ckeditor5-utils/src/lib/lodash/internal/mapGet.js → packages/ckeditor5-utils/src/lib/lodash/_mapGet.js

@@ -1,7 +1,7 @@
-import Map from './Map';
-import assocGet from './assocGet';
-import hashGet from './hashGet';
-import isKeyable from './isKeyable';
+import Map from './_Map';
+import assocGet from './_assocGet';
+import hashGet from './_hashGet';
+import isKeyable from './_isKeyable';
 
 /**
  * Gets the map value for `key`.

+ 4 - 4
packages/ckeditor5-utils/src/lib/lodash/internal/mapHas.js → packages/ckeditor5-utils/src/lib/lodash/_mapHas.js

@@ -1,7 +1,7 @@
-import Map from './Map';
-import assocHas from './assocHas';
-import hashHas from './hashHas';
-import isKeyable from './isKeyable';
+import Map from './_Map';
+import assocHas from './_assocHas';
+import hashHas from './_hashHas';
+import isKeyable from './_isKeyable';
 
 /**
  * Checks if a map value for `key` exists.

+ 4 - 4
packages/ckeditor5-utils/src/lib/lodash/internal/mapSet.js → packages/ckeditor5-utils/src/lib/lodash/_mapSet.js

@@ -1,7 +1,7 @@
-import Map from './Map';
-import assocSet from './assocSet';
-import hashSet from './hashSet';
-import isKeyable from './isKeyable';
+import Map from './_Map';
+import assocSet from './_assocSet';
+import hashSet from './_hashSet';
+import isKeyable from './_isKeyable';
 
 /**
  * Sets the map `key` to `value`.

+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/mapToArray.js → packages/ckeditor5-utils/src/lib/lodash/_mapToArray.js


+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/nativeCreate.js → packages/ckeditor5-utils/src/lib/lodash/_nativeCreate.js

@@ -1,4 +1,4 @@
-import getNative from './getNative';
+import getNative from './_getNative';
 
 /* Built-in method references that are verified to be native. */
 var nativeCreate = getNative(Object, 'create');

+ 10 - 4
packages/ckeditor5-utils/src/lib/lodash/internal/root.js → packages/ckeditor5-utils/src/lib/lodash/_root.js

@@ -1,4 +1,4 @@
-import checkGlobal from './checkGlobal';
+import checkGlobal from './_checkGlobal';
 
 /** Used to determine if values are of the language type `Object`. */
 var objectTypes = {
@@ -7,10 +7,14 @@ var objectTypes = {
 };
 
 /** Detect free variable `exports`. */
-var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null;
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
+  ? exports
+  : undefined;
 
 /** Detect free variable `module`. */
-var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null;
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
+  ? module
+  : undefined;
 
 /** Detect free variable `global` from Node.js. */
 var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
@@ -30,6 +34,8 @@ var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
  * The `this` value is used if it's the global object to avoid Greasemonkey's
  * restricted `window` object, otherwise the `window` object is used.
  */
-var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
+var root = freeGlobal ||
+  ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
+    freeSelf || thisGlobal || Function('return this')();
 
 export default root;

+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/setToArray.js → packages/ckeditor5-utils/src/lib/lodash/_setToArray.js


+ 0 - 0
packages/ckeditor5-utils/src/lib/lodash/internal/stackClear.js → packages/ckeditor5-utils/src/lib/lodash/_stackClear.js


+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/stackDelete.js → packages/ckeditor5-utils/src/lib/lodash/_stackDelete.js

@@ -1,4 +1,4 @@
-import assocDelete from './assocDelete';
+import assocDelete from './_assocDelete';
 
 /**
  * Removes `key` and its value from the stack.

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/stackGet.js → packages/ckeditor5-utils/src/lib/lodash/_stackGet.js

@@ -1,4 +1,4 @@
-import assocGet from './assocGet';
+import assocGet from './_assocGet';
 
 /**
  * Gets the stack value for `key`.

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/internal/stackHas.js → packages/ckeditor5-utils/src/lib/lodash/_stackHas.js

@@ -1,4 +1,4 @@
-import assocHas from './assocHas';
+import assocHas from './_assocHas';
 
 /**
  * Checks if a stack value for `key` exists.

+ 2 - 2
packages/ckeditor5-utils/src/lib/lodash/internal/stackSet.js → packages/ckeditor5-utils/src/lib/lodash/_stackSet.js

@@ -1,5 +1,5 @@
-import MapCache from './MapCache';
-import assocSet from './assocSet';
+import MapCache from './_MapCache';
+import assocSet from './_assocSet';
 
 /** Used as the size to enable large array optimizations. */
 var LARGE_ARRAY_SIZE = 200;

+ 22 - 4
packages/ckeditor5-utils/src/lib/lodash/assignIn.js

@@ -1,15 +1,27 @@
 /**
- * lodash 4.0.1 (Custom Build) <https://lodash.com/>
+ * lodash 4.6.1 (Custom Build) <https://lodash.com/>
  * Build: `lodash modularize exports="es" include="clone,extend,isPlainObject,isObject,isArray,last,isEqual" --development --output src/lib/lodash`
  * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  * Available under MIT license <https://lodash.com/license>
  */
-import copyObject from './internal/copyObject';
-import createAssigner from './internal/createAssigner';
+import assignValue from './_assignValue';
+import copyObject from './_copyObject';
+import createAssigner from './_createAssigner';
+import isArrayLike from './isArrayLike';
+import isPrototype from './_isPrototype';
 import keysIn from './keysIn';
 
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
+var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
+
 /**
  * This method is like `_.assign` except that it iterates over own and
  * inherited source properties.
@@ -40,7 +52,13 @@ import keysIn from './keysIn';
  * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
  */
 var assignIn = createAssigner(function(object, source) {
-  copyObject(source, keysIn(source), object);
+  if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
+    copyObject(source, keysIn(source), object);
+    return;
+  }
+  for (var key in source) {
+    assignValue(object, key, source[key]);
+  }
 });
 
 export default assignIn;

+ 3 - 3
packages/ckeditor5-utils/src/lib/lodash/clone.js

@@ -1,12 +1,12 @@
 /**
- * lodash 4.0.1 (Custom Build) <https://lodash.com/>
+ * lodash 4.6.1 (Custom Build) <https://lodash.com/>
  * Build: `lodash modularize exports="es" include="clone,extend,isPlainObject,isObject,isArray,last,isEqual" --development --output src/lib/lodash`
  * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  * Available under MIT license <https://lodash.com/license>
  */
-import baseClone from './internal/baseClone';
+import baseClone from './_baseClone';
 
 /**
  * Creates a shallow clone of `value`.
@@ -33,7 +33,7 @@ import baseClone from './internal/baseClone';
  * // => true
  */
 function clone(value) {
-  return baseClone(value);
+  return baseClone(value, false, true);
 }
 
 export default clone;

+ 23 - 0
packages/ckeditor5-utils/src/lib/lodash/constant.js

@@ -0,0 +1,23 @@
+/**
+ * Creates a function that returns `value`.
+ *
+ * @static
+ * @memberOf _
+ * @category Util
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var getter = _.constant(object);
+ *
+ * getter() === object;
+ * // => true
+ */
+function constant(value) {
+  return function() {
+    return value;
+  };
+}
+
+export default constant;

+ 0 - 23
packages/ckeditor5-utils/src/lib/lodash/internal/baseCreate.js

@@ -1,23 +0,0 @@
-import isObject from '../isObject';
-
-/**
- * The base implementation of `_.create` without support for assigning
- * properties to the created object.
- *
- * @private
- * @param {Object} prototype The object to inherit from.
- * @returns {Object} Returns the new object.
- */
-var baseCreate = (function() {
-  function object() {}
-  return function(prototype) {
-    if (isObject(prototype)) {
-      object.prototype = prototype;
-      var result = new object;
-      object.prototype = undefined;
-    }
-    return result || {};
-  };
-}());
-
-export default baseCreate;

+ 0 - 19
packages/ckeditor5-utils/src/lib/lodash/internal/cloneBuffer.js

@@ -1,19 +0,0 @@
-import Uint8Array from './Uint8Array';
-
-/**
- * Creates a clone of `buffer`.
- *
- * @private
- * @param {ArrayBuffer} buffer The array buffer to clone.
- * @returns {ArrayBuffer} Returns the cloned array buffer.
- */
-function cloneBuffer(buffer) {
-  var Ctor = buffer.constructor,
-      result = new Ctor(buffer.byteLength),
-      view = new Uint8Array(result);
-
-  view.set(new Uint8Array(buffer));
-  return result;
-}
-
-export default cloneBuffer;

+ 0 - 17
packages/ckeditor5-utils/src/lib/lodash/internal/cloneMap.js

@@ -1,17 +0,0 @@
-import addMapEntry from './addMapEntry';
-import arrayReduce from './arrayReduce';
-import mapToArray from './mapToArray';
-
-/**
- * Creates a clone of `map`.
- *
- * @private
- * @param {Object} map The map to clone.
- * @returns {Object} Returns the cloned map.
- */
-function cloneMap(map) {
-  var Ctor = map.constructor;
-  return arrayReduce(mapToArray(map), addMapEntry, new Ctor);
-}
-
-export default cloneMap;

+ 0 - 17
packages/ckeditor5-utils/src/lib/lodash/internal/cloneSet.js

@@ -1,17 +0,0 @@
-import addSetEntry from './addSetEntry';
-import arrayReduce from './arrayReduce';
-import setToArray from './setToArray';
-
-/**
- * Creates a clone of `set`.
- *
- * @private
- * @param {Object} set The set to clone.
- * @returns {Object} Returns the cloned set.
- */
-function cloneSet(set) {
-  var Ctor = set.constructor;
-  return arrayReduce(setToArray(set), addSetEntry, new Ctor);
-}
-
-export default cloneSet;

+ 0 - 16
packages/ckeditor5-utils/src/lib/lodash/internal/initCloneObject.js

@@ -1,16 +0,0 @@
-import baseCreate from './baseCreate';
-import isFunction from '../isFunction';
-
-/**
- * Initializes an object clone.
- *
- * @private
- * @param {Object} object The object to clone.
- * @returns {Object} Returns the initialized clone.
- */
-function initCloneObject(object) {
-  var Ctor = object.constructor;
-  return baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
-}
-
-export default initCloneObject;

+ 2 - 2
packages/ckeditor5-utils/src/lib/lodash/isArray.js

@@ -1,5 +1,5 @@
 /**
- * lodash 4.0.1 (Custom Build) <https://lodash.com/>
+ * lodash 4.6.1 (Custom Build) <https://lodash.com/>
  * Build: `lodash modularize exports="es" include="clone,extend,isPlainObject,isObject,isArray,last,isEqual" --development --output src/lib/lodash`
  * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@@ -12,7 +12,7 @@
  *
  * @static
  * @memberOf _
- * @type Function
+ * @type {Function}
  * @category Lang
  * @param {*} value The value to check.
  * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.

+ 2 - 4
packages/ckeditor5-utils/src/lib/lodash/isArrayLike.js

@@ -1,4 +1,4 @@
-import getLength from './internal/getLength';
+import getLength from './_getLength';
 import isFunction from './isFunction';
 import isLength from './isLength';
 
@@ -9,7 +9,6 @@ import isLength from './isLength';
  *
  * @static
  * @memberOf _
- * @type Function
  * @category Lang
  * @param {*} value The value to check.
  * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
@@ -28,8 +27,7 @@ import isLength from './isLength';
  * // => false
  */
 function isArrayLike(value) {
-  return value != null &&
-    !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
+  return value != null && isLength(getLength(value)) && !isFunction(value);
 }
 
 export default isArrayLike;

+ 0 - 1
packages/ckeditor5-utils/src/lib/lodash/isArrayLikeObject.js

@@ -7,7 +7,6 @@ import isObjectLike from './isObjectLike';
  *
  * @static
  * @memberOf _
- * @type Function
  * @category Lang
  * @param {*} value The value to check.
  * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.

+ 48 - 0
packages/ckeditor5-utils/src/lib/lodash/isBuffer.js

@@ -0,0 +1,48 @@
+import constant from './constant';
+import root from './_root';
+
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+  'function': true,
+  'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
+  ? exports
+  : undefined;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
+  ? module
+  : undefined;
+
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports = (freeModule && freeModule.exports === freeExports)
+  ? freeExports
+  : undefined;
+
+/** Built-in value references. */
+var Buffer = moduleExports ? root.Buffer : undefined;
+
+/**
+ * Checks if `value` is a buffer.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
+ * @example
+ *
+ * _.isBuffer(new Buffer(2));
+ * // => true
+ *
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
+ */
+var isBuffer = !Buffer ? constant(false) : function(value) {
+  return value instanceof Buffer;
+};
+
+export default isBuffer;

+ 2 - 2
packages/ckeditor5-utils/src/lib/lodash/isEqual.js

@@ -1,12 +1,12 @@
 /**
- * lodash 4.0.1 (Custom Build) <https://lodash.com/>
+ * lodash 4.6.1 (Custom Build) <https://lodash.com/>
  * Build: `lodash modularize exports="es" include="clone,extend,isPlainObject,isObject,isArray,last,isEqual" --development --output src/lib/lodash`
  * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  * Available under MIT license <https://lodash.com/license>
  */
-import baseIsEqual from './internal/baseIsEqual';
+import baseIsEqual from './_baseIsEqual';
 
 /**
  * Performs a deep comparison between two values to determine if they are

+ 2 - 2
packages/ckeditor5-utils/src/lib/lodash/isFunction.js

@@ -31,8 +31,8 @@ var objectToString = objectProto.toString;
  */
 function isFunction(value) {
   // The use of `Object#toString` avoids issues with the `typeof` operator
-  // in Safari 8 which returns 'object' for typed array constructors, and
-  // PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+  // in Safari 8 which returns 'object' for typed array and weak map constructors,
+  // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
   var tag = isObject(value) ? objectToString.call(value) : '';
   return tag == funcTag || tag == genTag;
 }

+ 2 - 1
packages/ckeditor5-utils/src/lib/lodash/isLength.js

@@ -26,7 +26,8 @@ var MAX_SAFE_INTEGER = 9007199254740991;
  * // => false
  */
 function isLength(value) {
-  return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+  return typeof value == 'number' &&
+    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
 }
 
 export default isLength;

+ 1 - 1
packages/ckeditor5-utils/src/lib/lodash/isNative.js

@@ -1,5 +1,5 @@
 import isFunction from './isFunction';
-import isHostObject from './internal/isHostObject';
+import isHostObject from './_isHostObject';
 import isObjectLike from './isObjectLike';
 
 /** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */

+ 1 - 3
packages/ckeditor5-utils/src/lib/lodash/isObject.js

@@ -1,5 +1,5 @@
 /**
- * lodash 4.0.1 (Custom Build) <https://lodash.com/>
+ * lodash 4.6.1 (Custom Build) <https://lodash.com/>
  * Build: `lodash modularize exports="es" include="clone,extend,isPlainObject,isObject,isArray,last,isEqual" --development --output src/lib/lodash`
  * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@@ -31,8 +31,6 @@
  * // => false
  */
 function isObject(value) {
-  // Avoid a V8 JIT bug in Chrome 19-20.
-  // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
   var type = typeof value;
   return !!value && (type == 'object' || type == 'function');
 }

+ 5 - 7
packages/ckeditor5-utils/src/lib/lodash/isPlainObject.js

@@ -1,12 +1,12 @@
 /**
- * lodash 4.0.1 (Custom Build) <https://lodash.com/>
+ * lodash 4.6.1 (Custom Build) <https://lodash.com/>
  * Build: `lodash modularize exports="es" include="clone,extend,isPlainObject,isObject,isArray,last,isEqual" --development --output src/lib/lodash`
  * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  * Available under MIT license <https://lodash.com/license>
  */
-import isHostObject from './internal/isHostObject';
+import isHostObject from './_isHostObject';
 import isObjectLike from './isObjectLike';
 
 /** `Object#toString` result references. */
@@ -58,13 +58,11 @@ var getPrototypeOf = Object.getPrototypeOf;
  * // => true
  */
 function isPlainObject(value) {
-  if (!isObjectLike(value) || objectToString.call(value) != objectTag || isHostObject(value)) {
+  if (!isObjectLike(value) ||
+      objectToString.call(value) != objectTag || isHostObject(value)) {
     return false;
   }
-  var proto = objectProto;
-  if (typeof value.constructor == 'function') {
-    proto = getPrototypeOf(value);
-  }
+  var proto = getPrototypeOf(value);
   if (proto === null) {
     return true;
   }

Некоторые файлы не были показаны из-за большого количества измененных файлов