mail-parser-wasm 0.1.6 → 0.1.7
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 +33 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,16 +1,45 @@
|
|
|
1
|
-
# mail-parser-wasm
|
|
1
|
+
# mail-parser-wasm web and cf worker
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## [mail-parser-wasm](https://www.npmjs.com/package/mail-parser-wasm)
|
|
4
|
+
|
|
5
|
+
### mail-parser-wasm usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add mail-parser-wasm
|
|
9
|
+
```
|
|
4
10
|
|
|
5
11
|
```js
|
|
6
12
|
import { parse_message } from 'mail-parser-wasm'
|
|
7
13
|
|
|
8
|
-
const parsedEmail = parse_message(
|
|
14
|
+
const parsedEmail = parse_message(rawEmail);
|
|
9
15
|
```
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
### mail-parser-wasm build
|
|
12
18
|
|
|
13
19
|
```bash
|
|
14
20
|
wasm-pack build --release
|
|
15
21
|
wasm-pack publish
|
|
16
22
|
```
|
|
23
|
+
|
|
24
|
+
## [mail-parser-wasm-worker](https://www.npmjs.com/package/mail-parser-wasm-worker)
|
|
25
|
+
|
|
26
|
+
### mail-parser-wasm-worker usage
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pnpm add mail-parser-wasm-worker
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import { parse_message_wrapper } from 'mail-parser-wasm-worker'
|
|
34
|
+
|
|
35
|
+
const parsedEmail = parse_message_wrapper(rawEmail);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### mail-parser-wasm-worker build
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
wasm-pack build --out-dir web --target web --release
|
|
42
|
+
find web/ -type f ! -name '*.json' ! -name '.gitignore' -exec cp {} worker/ \;
|
|
43
|
+
# modify worker/package.json version or whatever
|
|
44
|
+
pnpm publish worker --no-git-checks
|
|
45
|
+
```
|