@hardlydifficult/text 1.0.13 → 1.0.15
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 +9 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @hardlydifficult/text
|
|
2
2
|
|
|
3
|
-
Text utilities for error formatting, template replacement, chunking, slugification, duration formatting, YAML/JSON conversion,
|
|
3
|
+
Text utilities for error formatting, template replacement, text chunking, slugification, duration formatting, YAML/JSON conversion, link generation, and file tree rendering.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -156,7 +156,7 @@ convertFormat("name: Alice\nage: 30", "json");
|
|
|
156
156
|
// }
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
-
### `formatYaml(data:
|
|
159
|
+
### `formatYaml(data: unknown): string`
|
|
160
160
|
|
|
161
161
|
Serialize data to clean YAML, using block literals for long strings containing colons.
|
|
162
162
|
|
|
@@ -205,6 +205,13 @@ linker.linkText("Fix ENG-533 and PR#42", { format: "markdown" });
|
|
|
205
205
|
|
|
206
206
|
Supported formats: `slack` (`<url|text>`), `markdown`/`discord` (`[text](url)`), `plaintext` (raw URL).
|
|
207
207
|
|
|
208
|
+
| Option | Description | Default |
|
|
209
|
+
|--------|-------------|---------|
|
|
210
|
+
| `format` | Target output format | `"markdown"` |
|
|
211
|
+
| `platform` | Alias for `format` | `"markdown"` |
|
|
212
|
+
| `skipCode` | Skip linkification inside code spans | `true` |
|
|
213
|
+
| `skipExistingLinks` | Skip linkification inside existing links | `true` |
|
|
214
|
+
|
|
208
215
|
## File Tree Rendering
|
|
209
216
|
|
|
210
217
|
### `buildFileTree(files: string[], options?: FileTreeOptions): string`
|