@enact/core 4.0.5 → 4.1.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  The following is a curated list of changes in the Enact core module, newest changes on the top.
4
4
 
5
+ ## [4.1.0] - 2021-11-04
6
+
7
+ No significant changes.
8
+
9
+ ## [4.0.8] - 2021-10-21
10
+
11
+ No significant changes.
12
+
13
+ ## [4.0.7] - 2021-09-28
14
+
15
+ No significant changes.
16
+
17
+ ## [4.0.6] - 2021-09-28
18
+
19
+ No significant changes.
20
+
5
21
  ## [4.0.5] - 2021-08-02
6
22
 
7
23
  No significant changes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enact/core",
3
- "version": "4.0.5",
3
+ "version": "4.1.0",
4
4
  "description": "Enact is an open source JavaScript framework containing everything you need to create a fast, scalable mobile or web application.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -32,7 +32,6 @@
32
32
  "react": "^17.0.1",
33
33
  "react-dom": "^17.0.1",
34
34
  "react-is": "^17.0.1",
35
- "recompose": "^0.30.0",
36
35
  "warning": "^4.0.3"
37
36
  }
38
37
  }
package/util/util.d.ts CHANGED
@@ -156,3 +156,7 @@ export function mapAndFilterChildren(
156
156
  callback: Function,
157
157
  filter?: Function
158
158
  ): any;
159
+ /**
160
+ * Performs shallow comparison for given objects.
161
+ */
162
+ export function shallowEqual(a: Obejct, b: Obejct): boolean;
package/util/util.js CHANGED
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "Job", {
9
9
  return _Job["default"];
10
10
  }
11
11
  });
12
- exports.mapAndFilterChildren = exports.perfNow = exports.mergeClassNameMaps = exports.memoize = exports.isRenderable = exports.extractAriaProps = exports.coerceFunction = exports.coerceArray = exports.clamp = exports.cap = void 0;
12
+ exports.shallowEqual = exports.mapAndFilterChildren = exports.perfNow = exports.mergeClassNameMaps = exports.memoize = exports.isRenderable = exports.extractAriaProps = exports.coerceFunction = exports.coerceArray = exports.clamp = exports.cap = void 0;
13
13
 
14
14
  var _always = _interopRequireDefault(require("ramda/src/always"));
15
15
 
@@ -44,6 +44,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
44
44
  * @exports mergeClassNameMaps
45
45
  * @exports perfNow
46
46
  * @exports mapAndFilterChildren
47
+ * @exports shallowEqual
47
48
  */
48
49
 
49
50
  /**
@@ -318,5 +319,48 @@ var mapAndFilterChildren = function mapAndFilterChildren(children, callback, fil
318
319
  return result;
319
320
  }
320
321
  };
322
+ /**
323
+ * Performs shallow comparison for given objects.
324
+ *
325
+ * @function
326
+ * @param {Obejct} a An object to compare.
327
+ * @param {Obejct} b An object to compare.
328
+ *
329
+ * @returns {Boolean} `true` if the values of all keys are strictly equal.
330
+ * @memberof core/util
331
+ * @public
332
+ */
333
+
334
+
335
+ exports.mapAndFilterChildren = mapAndFilterChildren;
336
+
337
+ var shallowEqual = function shallowEqual(a, b) {
338
+ if (Object.is(a, b)) {
339
+ return true;
340
+ }
341
+
342
+ if (typeof a !== 'object' || a === null || typeof b !== 'object' || b === null) {
343
+ return false;
344
+ }
345
+
346
+ var aKeys = Object.keys(a);
347
+ var bKeys = Object.keys(b); // early bail out if the objects have a different number of keys
348
+
349
+ if (aKeys.length !== bKeys.length) {
350
+ return false;
351
+ }
352
+
353
+ var hasOwn = Object.prototype.hasOwnProperty.bind(b);
354
+
355
+ for (var i = 0; i < aKeys.length; i++) {
356
+ var prop = aKeys[i];
357
+
358
+ if (!hasOwn(prop) || !Object.is(a[prop], b[prop])) {
359
+ return false;
360
+ }
361
+ }
362
+
363
+ return true;
364
+ };
321
365
 
322
- exports.mapAndFilterChildren = mapAndFilterChildren;
366
+ exports.shallowEqual = shallowEqual;