peasy-document 0.2.0 → 0.2.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 +16 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,13 +4,14 @@
4
4
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue)](https://www.typescriptlang.org/)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6
6
  [![Zero Dependencies](https://img.shields.io/badge/dependencies-0-brightgreen)](https://www.npmjs.com/package/peasy-document)
7
+ [![GitHub stars](https://agentgif.com/badge/github/peasytools/peasy-document-js/stars.svg)](https://github.com/peasytools/peasy-document-js)
7
8
 
8
9
  Pure TypeScript document conversion library for Markdown, HTML, CSV, JSON, and YAML transformations. Convert between 6 document formats with 10 conversion functions and frozen result objects -- all with zero runtime dependencies. Every conversion uses pure string processing, making it lightweight and fast for any JavaScript or TypeScript project.
9
10
 
10
11
  Part of the [Peasy Tools](https://peasytools.com) developer tools ecosystem.
11
12
 
12
13
  <p align="center">
13
- <img src="demo.gif" alt="peasy-document demo — Markdown to HTML conversion in terminal" width="800">
14
+ <a href="https://agentgif.com/FVZoyFwB"><img src="https://media.agentgif.com/FVZoyFwB.gif" alt="peasy-document demo — Markdown to HTML conversion in terminal" width="800"></a>
14
15
  </p>
15
16
 
16
17
  ## Table of Contents
@@ -106,6 +107,8 @@ console.log(result.content);
106
107
  // <blockquote><p>Important note about the API</p></blockquote>
107
108
  ```
108
109
 
110
+ Learn more: [Markdown to HTML Converter](https://peasyformats.com/doc/markdown-to-html/) · [Markdown vs Rich Text vs Plain Text](https://peasyformats.com/guides/markdown-vs-rich-text-vs-plain-text/) · [How to Convert Markdown to Other Formats](https://peasyformats.com/guides/how-to-convert-markdown-to-other-formats/)
111
+
109
112
  ### HTML Processing
110
113
 
111
114
  Extract plain text from HTML documents, convert HTML to Markdown, or turn plain text into HTML paragraphs.
@@ -144,6 +147,8 @@ console.log(html.content);
144
147
  // <p>Second paragraph.<br>With a line break.</p>
145
148
  ```
146
149
 
150
+ Learn more: [HTML Entities Encoder](https://peasyformats.com/doc/html-entities/) · [Plain Text vs Rich Text vs Markdown](https://peasyformats.com/guides/plain-text-vs-rich-text-vs-markdown/) · [What is MIME Sniffing?](https://peasyformats.com/glossary/mime-sniffing/)
151
+
147
152
  ### CSV and JSON Conversion
148
153
 
149
154
  Transform between CSV and JSON formats with proper handling of quoted fields, commas inside values, escaped quotes, and custom delimiters. Roundtrip-safe.
@@ -170,6 +175,8 @@ console.log(csv.content);
170
175
  const tsv = csvToJson("name\tage\nAlice\t30", "\t");
171
176
  ```
172
177
 
178
+ Learn more: [CSV vs JSON vs XML Data Formats](https://peasyformats.com/guides/csv-vs-json-vs-xml/) · [What is TSV?](https://peasyformats.com/glossary/tsv/) · [CSV Format Reference](https://peasyformats.com/formats/csv/)
179
+
173
180
  ### YAML Generation
174
181
 
175
182
  Convert JSON to YAML-like format without any external YAML library. Handles nested objects, arrays, strings, numbers, booleans, and null.
@@ -194,6 +201,8 @@ console.log(result.content);
194
201
  // cache: null
195
202
  ```
196
203
 
204
+ Learn more: [YAML JSON Converter](https://peasyformats.com/doc/yaml-json-converter/) · [JSON vs YAML vs TOML Configuration Formats](https://peasyformats.com/guides/json-vs-yaml-vs-toml/) · [YAML vs JSON vs TOML Configuration](https://peasyformats.com/guides/yaml-vs-json-vs-toml-configuration/)
205
+
197
206
  ### Table Formatting
198
207
 
199
208
  Parse CSV into structured table data, or render it directly as Markdown or HTML tables.
@@ -229,6 +238,8 @@ console.log(html.content);
229
238
  // </table>
230
239
  ```
231
240
 
241
+ Learn more: [Document Format Interoperability Guide](https://peasyformats.com/guides/document-format-interoperability-guide/) · [What is Metadata Stripping?](https://peasyformats.com/glossary/metadata-stripping/) · [HTML Format Reference](https://peasyformats.com/formats/html/)
242
+
232
243
  ## TypeScript Types
233
244
 
234
245
  ```typescript
@@ -297,10 +308,10 @@ Full API documentation at [peasyformats.com/developers/](https://peasyformats.co
297
308
 
298
309
  ## Learn More
299
310
 
300
- - **Tools**: [Markdown to HTML](https://peasyformats.com/tools/markdown-to-html/) · [CSV to JSON](https://peasyformats.com/tools/csv-to-json/) · [HTML to PDF](https://peasyformats.com/tools/html-to-pdf/) · [All Tools](https://peasyformats.com/)
301
- - **Guides**: [Markdown Guide](https://peasyformats.com/guides/convert/) · [All Guides](https://peasyformats.com/guides/)
302
- - **Glossary**: [Markdown](https://peasyformats.com/glossary/markdown/) · [CSV](https://peasyformats.com/glossary/csv/) · [All Terms](https://peasyformats.com/glossary/)
303
- - **Formats**: [Markdown](https://peasyformats.com/formats/markdown/) · [CSV](https://peasyformats.com/formats/csv/) · [All Formats](https://peasyformats.com/formats/)
311
+ - **Tools**: [Markdown to HTML](https://peasyformats.com/doc/markdown-to-html/) · [YAML JSON Converter](https://peasyformats.com/doc/yaml-json-converter/) · [Format Identifier](https://peasyformats.com/doc/format-identifier/) · [MIME Type Lookup](https://peasyformats.com/doc/mime-type-lookup/) · [Base64 Encoder](https://peasyformats.com/doc/base64-encoder/) · [URL Encoder](https://peasyformats.com/doc/url-encoder/) · [HTML Entities](https://peasyformats.com/doc/html-entities/) · [Line Ending Converter](https://peasyformats.com/doc/line-ending-converter/) · [Hex Dump Viewer](https://peasyformats.com/doc/hex-dump-viewer/) · [All Tools](https://peasyformats.com/)
312
+ - **Guides**: [JSON vs YAML vs TOML](https://peasyformats.com/guides/json-vs-yaml-vs-toml/) · [CSV vs JSON vs XML](https://peasyformats.com/guides/csv-vs-json-vs-xml/) · [Text Encoding UTF-8 ASCII](https://peasyformats.com/guides/text-encoding-utf8-ascii/) · [Markdown vs Rich Text vs Plain Text](https://peasyformats.com/guides/markdown-vs-rich-text-vs-plain-text/) · [How to Convert Markdown to Other Formats](https://peasyformats.com/guides/how-to-convert-markdown-to-other-formats/) · [Document Format Interoperability Guide](https://peasyformats.com/guides/document-format-interoperability-guide/) · [YAML vs JSON vs TOML Configuration](https://peasyformats.com/guides/yaml-vs-json-vs-toml-configuration/) · [All Guides](https://peasyformats.com/guides/)
313
+ - **Glossary**: [DOCX](https://peasyformats.com/glossary/docx/) · [EPUB](https://peasyformats.com/glossary/epub/) · [SVG](https://peasyformats.com/glossary/svg/) · [TSV](https://peasyformats.com/glossary/tsv/) · [ODF](https://peasyformats.com/glossary/odf/) · [MIME Sniffing](https://peasyformats.com/glossary/mime-sniffing/) · [File Signature](https://peasyformats.com/glossary/file-signature/) · [Metadata Stripping](https://peasyformats.com/glossary/metadata-stripping/) · [MessagePack](https://peasyformats.com/glossary/messagepack/) · [All Terms](https://peasyformats.com/glossary/)
314
+ - **Formats**: [CSV](https://peasyformats.com/formats/csv/) · [JSON](https://peasyformats.com/formats/json/) · [HTML](https://peasyformats.com/formats/html/) · [Markdown](https://peasyformats.com/formats/md/) · [YAML](https://peasyformats.com/formats/yaml/) · [XML](https://peasyformats.com/formats/xml/) · [TOML](https://peasyformats.com/formats/toml/) · [TXT](https://peasyformats.com/formats/txt/) · [TSV](https://peasyformats.com/formats/tsv/) · [RTF](https://peasyformats.com/formats/rtf/) · [DOCX](https://peasyformats.com/formats/docx/) · [All Formats](https://peasyformats.com/formats/)
304
315
  - **API**: [REST API Docs](https://peasyformats.com/developers/) · [OpenAPI Spec](https://peasyformats.com/api/openapi.json)
305
316
 
306
317
  ## Also Available
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peasy-document",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Document conversion library — Markdown, HTML, CSV, JSON, YAML. Zero dependencies, TypeScript-first.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",