@office-open/docx 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
@@ -4,7 +4,7 @@
4
4
  ![npm downloads](https://img.shields.io/npm/dw/@office-open/docx)
5
5
  ![npm license](https://img.shields.io/npm/l/@office-open/docx)
6
6
 
7
- > Generate .docx files with a nice declarative API. Works for Node.js and on the Browser.
7
+ > Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.
8
8
 
9
9
  ## Features
10
10
 
@@ -78,12 +78,12 @@ Check the [demo folder](./demo) for 100+ working examples covering every feature
78
78
 
79
79
  Performance comparison against original `docx` (9.6.1) package:
80
80
 
81
- | Scenario | @office-open/docx | docx | Speedup |
82
- | ------------------------------------------------------- | ----------------: | -------: | --------: |
83
- | Simple document (2 paragraphs) | 7,672 hz | 4,334 hz | **1.77x** |
84
- | Styled paragraphs (20 paragraphs) | 6,301 hz | 4,157 hz | **1.52x** |
85
- | Table (10x5 cells) | 3,854 hz | 2,595 hz | **1.49x** |
86
- | Full featured (header/footer/headings/table/paragraphs) | 2,745 hz | 2,366 hz | **1.16x** |
81
+ | Scenario | @office-open/docx | docx | Speedup |
82
+ | ------------------------------------------------------- | ----------------: | ---------: | --------: |
83
+ | Simple document (2 paragraphs) | 25.7K ops/s | 5.3K ops/s | **4.84x** |
84
+ | Styled paragraphs (20 paragraphs) | 24.2K ops/s | 4.4K ops/s | **5.45x** |
85
+ | Table (10x5 cells) | 15.5K ops/s | 3.3K ops/s | **4.70x** |
86
+ | Full featured (header/footer/headings/table/paragraphs) | 13.8K ops/s | 2.6K ops/s | **5.30x** |
87
87
 
88
88
  ## License
89
89
 
@@ -0,0 +1,27 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __exportAll = (all, no_symbols) => {
7
+ let target = {};
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
13
+ return target;
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
17
+ key = keys[i];
18
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
19
+ get: ((k) => from[k]).bind(null, key),
20
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
21
+ });
22
+ }
23
+ return to;
24
+ };
25
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
26
+ //#endregion
27
+ export { __reExport as n, __exportAll as t };