openjsxl 0.2.0 → 0.3.0

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/README.md CHANGED
@@ -1,8 +1,13 @@
1
1
  # openjsxl
2
2
 
3
- Fast, **zero-dependency**, TypeScript-first Excel (`.xlsx`) reader for JavaScript runtimes —
4
- Node, Deno, Bun, the browser, and edge. This is the package to install; it re-exports the
5
- [`@openjsxl/core`](https://www.npmjs.com/package/@openjsxl/core) engine.
3
+ [![npm version](https://img.shields.io/npm/v/openjsxl?color=cb3837&logo=npm)](https://www.npmjs.com/package/openjsxl)
4
+ [![install size](https://packagephobia.com/badge?p=openjsxl)](https://packagephobia.com/result?p=openjsxl)
5
+ [![types included](https://img.shields.io/npm/types/openjsxl)](https://www.npmjs.com/package/openjsxl)
6
+ [![license: MIT](https://img.shields.io/npm/l/openjsxl?color=blue)](./LICENSE)
7
+
8
+ Fast, **zero-dependency**, TypeScript-first Excel (`.xlsx`) reader **and writer** for JavaScript
9
+ runtimes — Node, Deno, Bun, the browser, and edge. This is the package to install; it re-exports
10
+ the [`@openjsxl/core`](https://www.npmjs.com/package/@openjsxl/core) engine.
6
11
 
7
12
  ```sh
8
13
  npm install openjsxl
@@ -28,6 +33,19 @@ For very large sheets use `streamSheetRows` (constant memory); a worksheet also
28
33
  `numberFormat`, `dimension`, `mergedCells`, `hyperlinks`, `comments`, and `visible`, and the
29
34
  reader throws a typed `XlsxError` (with a discriminating `code`) on malformed input.
30
35
 
36
+ **Writing (0.3):** describe a workbook as plain data and get back `.xlsx` bytes — cell types are
37
+ inferred from the JS values:
38
+
39
+ ```ts
40
+ import { writeXlsx } from 'openjsxl'
41
+
42
+ const bytes = await writeXlsx({
43
+ sheets: [{ name: 'Report', rows: [['Item', 'Added'], ['Apples', new Date('2024-01-15')]] }],
44
+ })
45
+ ```
46
+
47
+ `workbookToInput` turns an open `Workbook` back into writer input for read → modify → write.
48
+
31
49
  See the [project README](https://github.com/joaquimserafim/openjsxl#readme) for the full guide,
32
50
  design notes, and roadmap.
33
51
 
package/dist/index.js CHANGED
@@ -1,3 +1 @@
1
1
  export * from '@openjsxl/core';
2
- //# sourceMappingURL=index.js.map
3
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openjsxl",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Fast, zero-dependency Excel (.xlsx) reader and writer for Node, Deno, Bun, and the browser.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  ],
31
31
  "sideEffects": false,
32
32
  "dependencies": {
33
- "@openjsxl/core": "0.2.0"
33
+ "@openjsxl/core": "0.3.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@openjsxl/fixtures": "0.0.0"
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js","sourcesContent":[]}