hunspell-reader 9.0.1 → 9.0.2

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 +10 -8
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # hunspell-reader
2
2
 
3
- [![Build Status](https://travis-ci.org/streetsidesoftware/hunspell-reader.svg?branch=master)](https://travis-ci.org/streetsidesoftware/hunspell-reader)
4
-
5
3
  A library for reading Hunspell Dictionary files
6
4
 
7
5
  ## Application
@@ -61,16 +59,17 @@ hunspell-reader words ./en_US.dic -o en_US.txt
61
59
  ### Installation
62
60
 
63
61
  ```
64
- install -S hunspell-reader rxjs
62
+ npm install hunspell-reader
65
63
  ```
66
64
 
67
- Note: the reader uses rxjs 5.0.
68
-
69
65
  ### Usage
70
66
 
71
67
  Typescript / Javascript:
72
68
 
73
- ```typescript
69
+ <!--- @@inject: ./example-code/example.js --->
70
+
71
+ ```js
72
+ // ts-check
74
73
  import { HunspellReader } from 'hunspell-reader';
75
74
 
76
75
  const baseFile = 'en_US';
@@ -78,12 +77,15 @@ const dicFile = baseFile + '.dic';
78
77
  const affFile = baseFile + '.aff';
79
78
 
80
79
  // Initialize the reader with the Hunspell files
81
- const reader = new HunspellReader(affFile, dicFile);
80
+ const reader = await HunspellReader.createFromFiles(affFile, dicFile);
82
81
 
83
82
  // Get the words as an array
84
- const promiseArrayOfWords = reader.readWords().toArray().toPromise();
83
+ const words = [...reader];
84
+ console.log('%o', words);
85
85
  ```
86
86
 
87
+ <!--- @@inject-end: ./example-code/example.js --->
88
+
87
89
  ## Reference
88
90
 
89
91
  - [Hunspell Docs](https://github.com/hunspell/hunspell/blob/master/docs/hunspell.5.md)
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public",
5
5
  "provenance": true
6
6
  },
7
- "version": "9.0.1",
7
+ "version": "9.0.2",
8
8
  "description": "A library for reading Hunspell Dictionary Files",
9
9
  "bin": "bin.js",
10
10
  "type": "module",
@@ -48,9 +48,9 @@
48
48
  },
49
49
  "homepage": "https://github.com/streetsidesoftware/cspell/tree/main/packages/hunspell-reader#readme",
50
50
  "dependencies": {
51
- "@cspell/cspell-pipe": "^9.0.1",
52
- "@cspell/cspell-types": "^9.0.1",
53
- "commander": "^13.1.0",
51
+ "@cspell/cspell-pipe": "^9.0.2",
52
+ "@cspell/cspell-types": "^9.0.2",
53
+ "commander": "^14.0.0",
54
54
  "gensequence": "^7.0.0",
55
55
  "html-entities": "^2.6.0",
56
56
  "iconv-lite": "^0.6.3"
@@ -58,5 +58,5 @@
58
58
  "engines": {
59
59
  "node": ">=20"
60
60
  },
61
- "gitHead": "bdfabd3686aac9827f3af0ceb4aa74947b5f9d60"
61
+ "gitHead": "39dbd9ab9b8943a023d9eda7f65f81e822f939b5"
62
62
  }