File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/**
22 * Compare two objects equality
33 *
4- * @name isDeepEqual
54 * @param {object } firstObject First Object
65 * @param {object } secondObject Second Object to compare with the first one
76 * @returns {boolean } A boolean that indicates if objects are equal
8- *
7+ * @private
98 * @example <caption>Deep equality check</caption>
109 * isDeepEqual({
11- * " firstName": " John" ,
12- * " lastName": " Doe" ,
13- * " age" : 35
14- }, {
15- * " firstName": " John" ,
16- * " lastName": " Doe" ,
17- * " age" : 35,
10+ * firstName: ' John' ,
11+ * lastName: ' Doe' ,
12+ * age: 35
13+ * }, {
14+ * firstName: ' John' ,
15+ * lastName: ' Doe' ,
16+ * age: 35
1817 * }) // true
1918 */
2019export const isDeepEqual = ( object1 , object2 ) => {
@@ -23,7 +22,7 @@ export const isDeepEqual = (object1, object2) => {
2322
2423 if ( objKeys1 . length !== objKeys2 . length ) return false ;
2524
26- for ( var key of objKeys1 ) {
25+ for ( const key of objKeys1 ) {
2726 const value1 = object1 [ key ] ;
2827 const value2 = object2 [ key ] ;
2928
@@ -42,15 +41,14 @@ export const isDeepEqual = (object1, object2) => {
4241/**
4342 * Check for Object
4443 *
45- * @name isObject
4644 * @param {object } object Check if passed param is an object
4745 * @returns {boolean } A boolean that indicates if passed param is an object
48- *
46+ * @private
4947 * @example <caption>Check for object</caption>
5048 * isObject({
51- * " firstName": " John" ,
52- * " lastName": " Doe" ,
53- * " age" : 35
49+ * firstName: ' John' ,
50+ * lastName: ' Doe' ,
51+ * age: 35
5452 * }) // true
5553 */
5654const isObject = ( object ) => {
Original file line number Diff line number Diff line change 11import { deattribute } from '../deattribute'
22import { filterIncludes } from '../filterIncludes'
3+ import { isDeepEqual } from '../deepEqual'
34
45/**
56 * Core function to link relationships to included data
You can’t perform that action at this time.
0 commit comments