@cj-tech-master/excelts 3.0.1-canary.20251229011802.ccfcbcc → 3.0.1-canary.20251230172852.9dca08f
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/dist/browser/excelts.esm.js +22 -1
- package/dist/browser/excelts.esm.js.map +1 -1
- package/dist/browser/excelts.esm.min.js +2 -2
- package/dist/browser/excelts.iife.js +22 -1
- package/dist/browser/excelts.iife.js.map +1 -1
- package/dist/browser/excelts.iife.min.js +2 -2
- package/dist/cjs/doc/row.js +23 -0
- package/dist/esm/doc/row.js +23 -0
- package/dist/types/doc/row.d.ts +13 -0
- package/package.json +1 -1
package/dist/cjs/doc/row.js
CHANGED
|
@@ -221,6 +221,29 @@ class Row {
|
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
+
/**
|
|
225
|
+
* Get row values as a 0-based sparse array (column 1 => index 0).
|
|
226
|
+
*
|
|
227
|
+
* This is useful when you want to compare/stringify values without the
|
|
228
|
+
* leading separator produced by the 1-based sparse array returned by `values`.
|
|
229
|
+
*/
|
|
230
|
+
getValues() {
|
|
231
|
+
const values = [];
|
|
232
|
+
this._cells.forEach(cell => {
|
|
233
|
+
if (cell && cell.type !== enums_1.Enums.ValueType.Null) {
|
|
234
|
+
values[cell.col - 1] = cell.value;
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
return values;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Convenience stringification for row values.
|
|
241
|
+
*
|
|
242
|
+
* Equivalent to `row.getValues().join(separator)`.
|
|
243
|
+
*/
|
|
244
|
+
valuesToString(separator = ",") {
|
|
245
|
+
return this.getValues().join(separator);
|
|
246
|
+
}
|
|
224
247
|
/**
|
|
225
248
|
* Returns true if the row includes at least one cell with a value
|
|
226
249
|
*/
|
package/dist/esm/doc/row.js
CHANGED
|
@@ -218,6 +218,29 @@ class Row {
|
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* Get row values as a 0-based sparse array (column 1 => index 0).
|
|
223
|
+
*
|
|
224
|
+
* This is useful when you want to compare/stringify values without the
|
|
225
|
+
* leading separator produced by the 1-based sparse array returned by `values`.
|
|
226
|
+
*/
|
|
227
|
+
getValues() {
|
|
228
|
+
const values = [];
|
|
229
|
+
this._cells.forEach(cell => {
|
|
230
|
+
if (cell && cell.type !== Enums.ValueType.Null) {
|
|
231
|
+
values[cell.col - 1] = cell.value;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
return values;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Convenience stringification for row values.
|
|
238
|
+
*
|
|
239
|
+
* Equivalent to `row.getValues().join(separator)`.
|
|
240
|
+
*/
|
|
241
|
+
valuesToString(separator = ",") {
|
|
242
|
+
return this.getValues().join(separator);
|
|
243
|
+
}
|
|
221
244
|
/**
|
|
222
245
|
* Returns true if the row includes at least one cell with a value
|
|
223
246
|
*/
|
package/dist/types/doc/row.d.ts
CHANGED
|
@@ -74,6 +74,19 @@ declare class Row {
|
|
|
74
74
|
* Set the values by contiguous or sparse array, or by key'd object literal
|
|
75
75
|
*/
|
|
76
76
|
set values(value: RowValues);
|
|
77
|
+
/**
|
|
78
|
+
* Get row values as a 0-based sparse array (column 1 => index 0).
|
|
79
|
+
*
|
|
80
|
+
* This is useful when you want to compare/stringify values without the
|
|
81
|
+
* leading separator produced by the 1-based sparse array returned by `values`.
|
|
82
|
+
*/
|
|
83
|
+
getValues(): CellValue[];
|
|
84
|
+
/**
|
|
85
|
+
* Convenience stringification for row values.
|
|
86
|
+
*
|
|
87
|
+
* Equivalent to `row.getValues().join(separator)`.
|
|
88
|
+
*/
|
|
89
|
+
valuesToString(separator?: string): string;
|
|
77
90
|
/**
|
|
78
91
|
* Returns true if the row includes at least one cell with a value
|
|
79
92
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cj-tech-master/excelts",
|
|
3
|
-
"version": "3.0.1-canary.
|
|
3
|
+
"version": "3.0.1-canary.20251230172852.9dca08f",
|
|
4
4
|
"description": "TypeScript Excel Workbook Manager - Read and Write xlsx and csv Files.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|