@fileverse-dev/formulajs 4.4.17-fix-sort-fn-1 → 4.4.17-fix-sort-fn-3

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/lib/cjs/index.cjs CHANGED
@@ -1271,6 +1271,7 @@ function ROWS(array) {
1271
1271
  * @returns
1272
1272
  */
1273
1273
  function SORT(array, sort_index = 1, sort_order = 1, by_col = false) {
1274
+ console.log("SORT function called with arguments:", { array, sort_index, sort_order, by_col });
1274
1275
  if (!array || !Array.isArray(array)) return na;
1275
1276
  if (array.length === 0) return 0;
1276
1277
 
@@ -1334,7 +1335,11 @@ function SORT(array, sort_index = 1, sort_order = 1, by_col = false) {
1334
1335
  });
1335
1336
 
1336
1337
  const sorted = decorated.map((d) => d.row);
1337
- return byCol ? transpose(sorted) : sorted;
1338
+ const xxxxxx = byCol ? transpose(sorted) : sorted;
1339
+
1340
+ console.log("SORT result:", xxxxxx);
1341
+
1342
+ return xxxxxx;
1338
1343
  }
1339
1344
 
1340
1345
 
package/lib/esm/index.mjs CHANGED
@@ -1269,6 +1269,7 @@ function ROWS(array) {
1269
1269
  * @returns
1270
1270
  */
1271
1271
  function SORT(array, sort_index = 1, sort_order = 1, by_col = false) {
1272
+ console.log("SORT function called with arguments:", { array, sort_index, sort_order, by_col });
1272
1273
  if (!array || !Array.isArray(array)) return na;
1273
1274
  if (array.length === 0) return 0;
1274
1275
 
@@ -1332,7 +1333,11 @@ function SORT(array, sort_index = 1, sort_order = 1, by_col = false) {
1332
1333
  });
1333
1334
 
1334
1335
  const sorted = decorated.map((d) => d.row);
1335
- return byCol ? transpose(sorted) : sorted;
1336
+ const xxxxxx = byCol ? transpose(sorted) : sorted;
1337
+
1338
+ console.log("SORT result:", xxxxxx);
1339
+
1340
+ return xxxxxx;
1336
1341
  }
1337
1342
 
1338
1343
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/formulajs",
3
- "version": "4.4.17-fix-sort-fn-1",
3
+ "version": "4.4.17-fix-sort-fn-3",
4
4
  "description": "JavaScript implementation of most Microsoft Excel formula functions",
5
5
  "author": "Formulajs",
6
6
  "publishConfig": {