Skip to content

Commit 7a25a3a

Browse files
authored
Merge pull request #13 from lupodevelop/v1.2.2-fixes-and-corrections
Update README with module usage guide
2 parents 9cb11e8 + 9e9530d commit 7a25a3a

1 file changed

Lines changed: 21 additions & 5 deletions

File tree

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,30 @@ extra.slugify_opts("Hello World", 0, "_", False) // → "hello_world"
259259

260260
---
261261

262-
## 🏗️ Module Structure
262+
## 🏗️ Module Guide
263+
264+
### Which module should I use?
265+
266+
| Module | When to use | Import |
267+
|--------|-------------|--------|
268+
| **`str`** | Most common operations | `import str` |
269+
| **`str/core`** | Full grapheme-aware API, advanced features | `import str/core` |
270+
| **`str/extra`** | ASCII folding, slugs, case conversions | `import str/extra` |
271+
| **`str/tokenize`** | Reference implementation (pedagogic only) | `import str/tokenize` |
272+
273+
**Quick start:** Use `import str` for everyday needs. The main `str` module re-exports commonly used functions from `core` and `extra`.
274+
275+
**Advanced users:** Import `str/core` and `str/extra` directly when you need the complete API or want explicit control.
276+
277+
### Module structure
263278

264279
```
265280
str/
266-
├── core # Grapheme-aware core utilities
267-
├── extra # ASCII folding, slugs, case conversions
268-
├── tokenize # Pure-Gleam tokenizer (reference)
269-
└── internal_* # Character tables (internal)
281+
├── str.gleam # Main module (re-exports common functions)
282+
├── core.gleam # Grapheme-aware utilities
283+
├── extra.gleam # ASCII folding, slugs, case conversions
284+
├── tokenize.gleam # Pure-Gleam tokenizer (reference)
285+
└── internal_* # Character tables (not public API)
270286
```
271287

272288
---

0 commit comments

Comments
 (0)