@cj-tech-master/excelts 3.1.0-canary.20260102061656.6ddacdd → 3.1.0-canary.20260102063840.4ffdd8b

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.
@@ -1467,12 +1467,8 @@ class Transform extends event_emitter_1.EventEmitter {
1467
1467
  resolve();
1468
1468
  }
1469
1469
  };
1470
- if (transformFn.length >= 3) {
1471
- transformFn.call(this, chunk, "utf8", callback);
1472
- }
1473
- else {
1474
- transformFn.call(this, chunk, callback);
1475
- }
1470
+ const args = transformFn.length >= 3 ? [chunk, "utf8", callback] : [chunk, callback];
1471
+ transformFn.apply(this, args);
1476
1472
  });
1477
1473
  }
1478
1474
  else if (userTransform) {
@@ -1492,15 +1488,8 @@ class Transform extends event_emitter_1.EventEmitter {
1492
1488
  resolve();
1493
1489
  }
1494
1490
  };
1495
- // Support both Node.js-style signatures:
1496
- // - transform(chunk, callback)
1497
- // - transform(chunk, encoding, callback)
1498
- if (transformFn.length >= 3) {
1499
- transformFn.call(getInstance(), chunk, "utf8", callback);
1500
- }
1501
- else {
1502
- transformFn.call(getInstance(), chunk, callback);
1503
- }
1491
+ const args = transformFn.length >= 3 ? [chunk, "utf8", callback] : [chunk, callback];
1492
+ transformFn.apply(getInstance(), args);
1504
1493
  });
1505
1494
  }
1506
1495
  else {
@@ -1424,12 +1424,8 @@ export class Transform extends EventEmitter {
1424
1424
  resolve();
1425
1425
  }
1426
1426
  };
1427
- if (transformFn.length >= 3) {
1428
- transformFn.call(this, chunk, "utf8", callback);
1429
- }
1430
- else {
1431
- transformFn.call(this, chunk, callback);
1432
- }
1427
+ const args = transformFn.length >= 3 ? [chunk, "utf8", callback] : [chunk, callback];
1428
+ transformFn.apply(this, args);
1433
1429
  });
1434
1430
  }
1435
1431
  else if (userTransform) {
@@ -1449,15 +1445,8 @@ export class Transform extends EventEmitter {
1449
1445
  resolve();
1450
1446
  }
1451
1447
  };
1452
- // Support both Node.js-style signatures:
1453
- // - transform(chunk, callback)
1454
- // - transform(chunk, encoding, callback)
1455
- if (transformFn.length >= 3) {
1456
- transformFn.call(getInstance(), chunk, "utf8", callback);
1457
- }
1458
- else {
1459
- transformFn.call(getInstance(), chunk, callback);
1460
- }
1448
+ const args = transformFn.length >= 3 ? [chunk, "utf8", callback] : [chunk, callback];
1449
+ transformFn.apply(getInstance(), args);
1461
1450
  });
1462
1451
  }
1463
1452
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cj-tech-master/excelts",
3
- "version": "3.1.0-canary.20260102061656.6ddacdd",
3
+ "version": "3.1.0-canary.20260102063840.4ffdd8b",
4
4
  "description": "TypeScript Excel Workbook Manager - Read and Write xlsx and csv Files.",
5
5
  "type": "module",
6
6
  "publishConfig": {