investira.sdk 2.3.18 → 2.3.19

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
@@ -529,3 +529,7 @@ O contrutor para a criação das mensagem foi alterado.
529
529
  # 2.3.18
530
530
 
531
531
  - [objetcs] Correção da mergeObject
532
+
533
+ # 2.3.19
534
+
535
+ - [arrays] Método isEqual
@@ -167,6 +167,32 @@ const arrays = {
167
167
  return pArray.filter((pItem, pIndex) => {
168
168
  return pArray.indexOf(pItem) === pIndex;
169
169
  });
170
+ },
171
+ /**
172
+ * Retorna se array é iqual
173
+ *
174
+ * @param {*} pArray1
175
+ * @param {*} pArray2
176
+ * @return {*}
177
+ */
178
+ isEqual: (pArray1, pArray2) => {
179
+ // Check if the arrays have the same length
180
+ if (pArray1.length !== pArray2.length) {
181
+ return false;
182
+ }
183
+
184
+ // Sort the arrays before comparison
185
+ const xSortedArr1 = pArray1.slice().sort();
186
+ const xSortedArr2 = pArray2.slice().sort();
187
+
188
+ // Check each element individually
189
+ for (let i = 0; i < xSortedArr1.length; i++) {
190
+ if (xSortedArr1[i] !== xSortedArr2[i]) {
191
+ return false;
192
+ }
193
+ }
194
+ // If all elements are equal, the arrays are equal
195
+ return true;
170
196
  }
171
197
  };
172
198
 
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "investira.sdk",
3
- "version": "2.3.18",
3
+ "version": "2.3.19",
4
4
  "author": "Investira",
5
5
  "description": "Investira SDK",
6
6
  "main": "index.js",
7
7
  "type": "commonjs",
8
8
  "registry": true,
9
- "raw": "investira.sdk@2.3.18",
9
+ "raw": "investira.sdk@2.3.19",
10
10
  "escapedName": "investira.sdk",
11
- "rawSpec": "2.3.18",
11
+ "rawSpec": "2.3.19",
12
12
  "saveSpec": null,
13
- "fetchSpec": "2.3.18",
13
+ "fetchSpec": "2.3.19",
14
14
  "homepage": "https://investira.com.br/",
15
15
  "engines": {
16
16
  "node": ">=11.11.0 <=18.12",
@@ -38,7 +38,7 @@
38
38
  "axios": "1.5.1",
39
39
  "deep-diff": "1.0.2",
40
40
  "flatted": "3.2.9",
41
- "investira.data": "^1.3.6",
41
+ "investira.data": "^1.3.7",
42
42
  "moment": "^2.30.1"
43
43
  },
44
44
  "devDependencies": {