fixnow 2.0.1 → 2.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.
- package/README.md +41 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,31 +9,53 @@
|
|
|
9
9
|
|
|
10
10
|
<br>
|
|
11
11
|
|
|
12
|
-
<a href="https://www.npmjs.com/package/fixnow"><img alt="NPM version" src="https://img.shields.io/npm/v/fixnow.svg?style=for-the-badge&labelColor=
|
|
13
|
-
<a href="https://www.npmjs.com/package/fixnow"><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/fixnow.svg?style=for-the-badge&labelColor=
|
|
14
|
-
<a href="https://github.com/bastndev/fixnow/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/npm/l/fixnow.svg?style=for-the-badge&labelColor=
|
|
15
|
-
<a href="https://github.com/bastndev/fixnow/stargazers"><img alt="GitHub Stars" src="https://img.shields.io/github/stars/bastndev/fixnow.svg?style=for-the-badge&labelColor=
|
|
12
|
+
<a href="https://www.npmjs.com/package/fixnow"><img alt="NPM version" src="https://img.shields.io/npm/v/fixnow.svg?style=for-the-badge&logo=npm&color=ef4444&labelColor=18181b"></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/fixnow"><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/fixnow.svg?style=for-the-badge&logo=npm&color=ef4444&labelColor=18181b"></a>
|
|
14
|
+
<a href="https://github.com/bastndev/fixnow/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/npm/l/fixnow.svg?style=for-the-badge&color=ef4444&labelColor=18181b"></a>
|
|
15
|
+
<a href="https://github.com/bastndev/fixnow/stargazers"><img alt="GitHub Stars" src="https://img.shields.io/github/stars/bastndev/fixnow.svg?style=for-the-badge&logo=github&color=ef4444&labelColor=18181b"></a>
|
|
16
16
|
|
|
17
|
-
<
|
|
17
|
+
<br>
|
|
18
18
|
|
|
19
19
|
<p align="center">
|
|
20
|
-
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_ES.md">Español 🇪🇸</a>
|
|
21
|
-
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_ZH.md">中文 🇨🇳</a>
|
|
22
|
-
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_DE.md">Deutsch 🇩🇪</a>
|
|
23
|
-
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_FR.md">Français 🇫🇷</a>
|
|
24
|
-
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_JA.md">日本語 🇯🇵</a>
|
|
25
|
-
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_KO.md">한국어 🇰🇷</a>
|
|
26
|
-
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_PT.md">Português 🇧🇷</a>
|
|
27
|
-
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_RU.md">Русский 🇷🇺</a>
|
|
28
|
-
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_VI.md">Tiếng Việt 🇻🇳</a>
|
|
29
|
-
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_AR.md">العربية 🇸🇦</a>
|
|
30
|
-
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_HI.md">हिन्दी 🇮🇳</a
|
|
20
|
+
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_ES.md">Español 🇪🇸</a> •
|
|
21
|
+
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_ZH.md">中文 🇨🇳</a> •
|
|
22
|
+
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_DE.md">Deutsch 🇩🇪</a> •
|
|
23
|
+
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_FR.md">Français 🇫🇷</a> •
|
|
24
|
+
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_JA.md">日本語 🇯🇵</a> •
|
|
25
|
+
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_KO.md">한국어 🇰🇷</a> •
|
|
26
|
+
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_PT.md">Português 🇧🇷</a> •
|
|
27
|
+
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_RU.md">Русский 🇷🇺</a> •
|
|
28
|
+
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_VI.md">Tiếng Việt 🇻🇳</a> •
|
|
29
|
+
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_AR.md">العربية 🇸🇦</a> •
|
|
30
|
+
<a href="https://github.com/bastndev/fixnow/blob/main/public/docs/README_HI.md">हिन्दी 🇮🇳</a>
|
|
31
31
|
</p>
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
34
|
<br>
|
|
35
35
|
|
|
36
|
-
A tiny multilingual spell checker with correction suggestions. Dictionaries are bundled, so `npm i fixnow` gives you everything — with **zero runtime dependencies**, in both ESM and CommonJS.
|
|
36
|
+
> A tiny multilingual spell checker with correction suggestions. Dictionaries are bundled, so `npm i fixnow` gives you everything — with **zero runtime dependencies**, in both ESM and CommonJS.
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
|
|
40
|
+
- 📦 **Zero Dependencies** — Keeps your `node_modules` clean and lightweight.
|
|
41
|
+
- 🌍 **Built-in Dictionaries** — Includes Arabic, German, English, Spanish, French, Portuguese, Russian, and Vietnamese.
|
|
42
|
+
- ⚡ **Slim Builds** — Import only the language you need (e.g. `import { check } from "fixnow/es"`) to optimize bundle size.
|
|
43
|
+
- 🛡️ **Smart Tokenization** — Automatically ignores code spans, URLs, emails, and identifiers to prevent false positives.
|
|
44
|
+
- 🧩 **Universal** — Works seamlessly in both ESM and CommonJS projects.
|
|
45
|
+
|
|
46
|
+
## Architecture
|
|
47
|
+
|
|
48
|
+
```mermaid
|
|
49
|
+
flowchart LR
|
|
50
|
+
Input["Input Text"] --> Tokenizer
|
|
51
|
+
Tokenizer --> |"Skips Code / URLs"| Check{"Dictionary"}
|
|
52
|
+
Check -->|"Valid Word"| Pass["No Issues"]
|
|
53
|
+
Check -->|"Typo Detected"| Engine("Correction Engine")
|
|
54
|
+
Engine --> Issues["SpellIssue[]"]
|
|
55
|
+
|
|
56
|
+
style Input fill:#18181b,stroke:#ef4444,stroke-width:2px,color:#fff
|
|
57
|
+
style Issues fill:#18181b,stroke:#ef4444,stroke-width:2px,color:#fff
|
|
58
|
+
```
|
|
37
59
|
|
|
38
60
|
## Install
|
|
39
61
|
|
|
@@ -126,7 +148,7 @@ await checkText(text, { language: "en", protectedSegments: false });
|
|
|
126
148
|
|
|
127
149
|
The same option is exposed on `tokenize(text, protectedSegments)`.
|
|
128
150
|
|
|
129
|
-
### Slim
|
|
151
|
+
### Slim Builds
|
|
130
152
|
|
|
131
153
|
If you only need one language, import it via the language subpath. Your bundler only
|
|
132
154
|
copies the dictionary you actually use:
|
|
@@ -202,4 +224,4 @@ breaking change:
|
|
|
202
224
|
|
|
203
225
|
## License
|
|
204
226
|
|
|
205
|
-
[MIT](./LICENSE)
|
|
227
|
+
[MIT](./LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fixnow",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Tiny multilingual spell checker with suggestions. Arabic, German, English, Spanish, French, Portuguese, Russian and Vietnamese dictionaries bundled — one install, zero runtime dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|