@cj-tech-master/excelts 8.1.0 → 8.1.1
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 +3 -7
- package/README_zh.md +3 -7
- package/dist/browser/modules/pdf/reader/metadata-reader.js +4 -3
- package/dist/cjs/modules/pdf/reader/metadata-reader.js +4 -2
- package/dist/esm/modules/pdf/reader/metadata-reader.js +4 -3
- package/dist/iife/excelts.iife.js +1 -1
- package/dist/iife/excelts.iife.min.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/cjnoname/excelts/actions/workflows/ci.yml) [中文](README_zh.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The TypeScript ecosystem is heavily fragmented when it comes to document and data processing. To handle Excel, PDF, CSV, XML, ZIP, and streaming, developers often need to pull in a different package for each task — and then yet another set of packages to make them work in the browser, plus separate streaming wrappers on top. These libraries vary in API style, quality, and maintenance status, creating a tax on every project that needs more than one of them.
|
|
6
|
+
|
|
7
|
+
ExcelTS was built to fix this. One package, one consistent API, one codebase — working identically across Node.js, Bun, and browsers. Streaming is a first-class citizen in every module, not an afterthought bolted on through a third-party adapter. The goal is simple: install once, import what you need, and get the same reliable behavior everywhere — with maximum streaming performance out of the box.
|
|
6
8
|
|
|
7
9
|
## About This Project
|
|
8
10
|
|
|
@@ -14,12 +16,6 @@ ExcelTS is a zero-dependency TypeScript toolkit for spreadsheets and documents:
|
|
|
14
16
|
- **Cross-Platform** — Node.js 22+, Bun, Chrome 89+, Firefox 102+, Safari 14.1+
|
|
15
17
|
- **ESM First** — Native ES Modules with CommonJS compatibility and full tree-shaking
|
|
16
18
|
|
|
17
|
-
## Motivation
|
|
18
|
-
|
|
19
|
-
The TypeScript ecosystem is heavily fragmented when it comes to document and data processing. To handle Excel, PDF, CSV, XML, ZIP, and streaming, developers often need to pull in a different package for each task — and then yet another set of packages to make them work in the browser, plus separate streaming wrappers on top. These libraries vary in API style, quality, and maintenance status, creating a tax on every project that needs more than one of them.
|
|
20
|
-
|
|
21
|
-
ExcelTS was built to fix this. One package, one consistent API, one codebase — working identically across Node.js, Bun, and browsers. Streaming is a first-class citizen in every module, not an afterthought bolted on through a third-party adapter. The goal is simple: install once, import what you need, and get the same reliable behavior everywhere — with maximum streaming performance out of the box.
|
|
22
|
-
|
|
23
19
|
## Modules
|
|
24
20
|
|
|
25
21
|
ExcelTS is organized into seven standalone modules. Each module has its own documentation and runnable examples.
|
package/README_zh.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/cjnoname/excelts/actions/workflows/ci.yml) [English](README.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
TypeScript 生态在文档和数据处理领域长期存在碎片化问题。处理 Excel、PDF、CSV、XML、ZIP 和流式操作,往往需要分别引入不同的包;到了浏览器端又要换一套方案;流式处理还得再额外接入一个适配库。这些库的 API 风格、质量和维护状态参差不齐,给每个需要组合使用它们的项目都带来了额外的负担。
|
|
6
|
+
|
|
7
|
+
ExcelTS 正是为了解决这个问题而生。一个包、一套 API、一份代码 — 在 Node.js、Bun 和浏览器中行为完全一致。流式处理是每个模块的一等公民,而非通过第三方适配器后期拼装的附属品。目标很简单:安装一次,按需导入,在任何环境下都获得相同的可靠体验 — 同时将流式处理的性能发挥到极致。
|
|
6
8
|
|
|
7
9
|
## 关于本项目
|
|
8
10
|
|
|
@@ -14,12 +16,6 @@ ExcelTS 是一个零依赖的 TypeScript 电子表格和文档工具包:
|
|
|
14
16
|
- **跨平台** — Node.js 22+、Bun、Chrome 89+、Firefox 102+、Safari 14.1+
|
|
15
17
|
- **ESM 优先** — 原生 ES Modules,兼容 CommonJS,完整的 tree-shaking 支持
|
|
16
18
|
|
|
17
|
-
## 项目初衷
|
|
18
|
-
|
|
19
|
-
TypeScript 生态在文档和数据处理领域长期存在碎片化问题。处理 Excel、PDF、CSV、XML、ZIP 和流式操作,往往需要分别引入不同的包;到了浏览器端又要换一套方案;流式处理还得再额外接入一个适配库。这些库的 API 风格、质量和维护状态参差不齐,给每个需要组合使用它们的项目都带来了额外的负担。
|
|
20
|
-
|
|
21
|
-
ExcelTS 正是为了解决这个问题而生。一个包、一套 API、一份代码 — 在 Node.js、Bun 和浏览器中行为完全一致。流式处理是每个模块的一等公民,而非通过第三方适配器后期拼装的附属品。目标很简单:安装一次,按需导入,在任何环境下都获得相同的可靠体验 — 同时将流式处理的性能发挥到极致。
|
|
22
|
-
|
|
23
19
|
## 模块
|
|
24
20
|
|
|
25
21
|
ExcelTS 由七个独立模块组成,每个模块都有自己的文档和可运行示例。
|
|
@@ -217,13 +217,14 @@ function extractXmpField(xml, field) {
|
|
|
217
217
|
}
|
|
218
218
|
return null;
|
|
219
219
|
}
|
|
220
|
-
|
|
220
|
+
/** @internal Exported for testing only. */
|
|
221
|
+
export function decodeXmlEntities(text) {
|
|
221
222
|
return text
|
|
222
|
-
.replace(/&/g, "&")
|
|
223
223
|
.replace(/</g, "<")
|
|
224
224
|
.replace(/>/g, ">")
|
|
225
225
|
.replace(/"/g, '"')
|
|
226
|
-
.replace(/'/g, "'")
|
|
226
|
+
.replace(/'/g, "'")
|
|
227
|
+
.replace(/&/g, "&");
|
|
227
228
|
}
|
|
228
229
|
// =============================================================================
|
|
229
230
|
// Page Size
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.extractMetadata = extractMetadata;
|
|
19
|
+
exports.decodeXmlEntities = decodeXmlEntities;
|
|
19
20
|
const pdf_parser_1 = require("./pdf-parser");
|
|
20
21
|
// =============================================================================
|
|
21
22
|
// Public API
|
|
@@ -220,13 +221,14 @@ function extractXmpField(xml, field) {
|
|
|
220
221
|
}
|
|
221
222
|
return null;
|
|
222
223
|
}
|
|
224
|
+
/** @internal Exported for testing only. */
|
|
223
225
|
function decodeXmlEntities(text) {
|
|
224
226
|
return text
|
|
225
|
-
.replace(/&/g, "&")
|
|
226
227
|
.replace(/</g, "<")
|
|
227
228
|
.replace(/>/g, ">")
|
|
228
229
|
.replace(/"/g, '"')
|
|
229
|
-
.replace(/'/g, "'")
|
|
230
|
+
.replace(/'/g, "'")
|
|
231
|
+
.replace(/&/g, "&");
|
|
230
232
|
}
|
|
231
233
|
// =============================================================================
|
|
232
234
|
// Page Size
|
|
@@ -217,13 +217,14 @@ function extractXmpField(xml, field) {
|
|
|
217
217
|
}
|
|
218
218
|
return null;
|
|
219
219
|
}
|
|
220
|
-
|
|
220
|
+
/** @internal Exported for testing only. */
|
|
221
|
+
export function decodeXmlEntities(text) {
|
|
221
222
|
return text
|
|
222
|
-
.replace(/&/g, "&")
|
|
223
223
|
.replace(/</g, "<")
|
|
224
224
|
.replace(/>/g, ">")
|
|
225
225
|
.replace(/"/g, '"')
|
|
226
|
-
.replace(/'/g, "'")
|
|
226
|
+
.replace(/'/g, "'")
|
|
227
|
+
.replace(/&/g, "&");
|
|
227
228
|
}
|
|
228
229
|
// =============================================================================
|
|
229
230
|
// Page Size
|
package/package.json
CHANGED