@gukhanmun/napi 0.4.0-dev.365 → 0.4.0-dev.368

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.
Files changed (2) hide show
  1. package/README.md +7 -2
  2. package/package.json +8 -8
package/README.md CHANGED
@@ -61,17 +61,22 @@ dictionary bytes from disk.
61
61
  ### Streaming
62
62
 
63
63
  ~~~~ ts
64
- const stream = g.convertStream("text/html");
64
+ const stream = g.stream("html");
65
65
  const writer = stream.writable.getWriter();
66
66
  const reader = stream.readable.getReader();
67
+ const output = reader.read();
67
68
 
68
69
  await writer.write("<p>漢字</p>");
69
70
  await writer.close();
70
71
 
71
- const { value } = await reader.read();
72
+ const { value } = await output;
72
73
  console.log(value); // "<p>한자</p>"
73
74
  ~~~~
74
75
 
76
+ Both JavaScript bindings buffer all input and convert it when the writable
77
+ side closes. Disabling homophone marking does not enable partial output.
78
+ Start reading before writing so stream backpressure does not block the writer.
79
+
75
80
 
76
81
  License
77
82
  -------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gukhanmun/napi",
3
- "version": "0.4.0-dev.365",
3
+ "version": "0.4.0-dev.368",
4
4
  "description": "Node.js native addon (napi-rs) for the Gukhanmun hanja-to-hangul converter.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -14,12 +14,12 @@
14
14
  "dist"
15
15
  ],
16
16
  "optionalDependencies": {
17
- "@gukhanmun/napi-aarch64-apple-darwin": "0.4.0-dev.365+4eeb2eb",
18
- "@gukhanmun/napi-x86_64-apple-darwin": "0.4.0-dev.365+4eeb2eb",
19
- "@gukhanmun/napi-aarch64-pc-windows-msvc": "0.4.0-dev.365+4eeb2eb",
20
- "@gukhanmun/napi-x86_64-pc-windows-msvc": "0.4.0-dev.365+4eeb2eb",
21
- "@gukhanmun/napi-aarch64-unknown-linux-gnu": "0.4.0-dev.365+4eeb2eb",
22
- "@gukhanmun/napi-x86_64-unknown-linux-gnu": "0.4.0-dev.365+4eeb2eb"
17
+ "@gukhanmun/napi-aarch64-apple-darwin": "0.4.0-dev.368+bffd90e",
18
+ "@gukhanmun/napi-x86_64-apple-darwin": "0.4.0-dev.368+bffd90e",
19
+ "@gukhanmun/napi-aarch64-pc-windows-msvc": "0.4.0-dev.368+bffd90e",
20
+ "@gukhanmun/napi-x86_64-pc-windows-msvc": "0.4.0-dev.368+bffd90e",
21
+ "@gukhanmun/napi-aarch64-unknown-linux-gnu": "0.4.0-dev.368+bffd90e",
22
+ "@gukhanmun/napi-x86_64-unknown-linux-gnu": "0.4.0-dev.368+bffd90e"
23
23
  },
24
24
  "homepage": "https://github.com/dahlia/gukhanmun",
25
25
  "bugs": "https://github.com/dahlia/gukhanmun/issues",
@@ -61,7 +61,7 @@
61
61
  "@gukhanmun/types": "*"
62
62
  },
63
63
  "devDependencies": {
64
- "@gukhanmun/types": "0.4.0-dev.365+4eeb2eb"
64
+ "@gukhanmun/types": "0.4.0-dev.368+bffd90e"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "tsdown"