{"library":"md-utils-ts","title":"Markdown Utilities for TypeScript","description":"`md-utils-ts` is a lightweight, TypeScript-first utility library designed for programmatic generation of common Markdown syntax elements. Currently at version 2.0.0, it provides a focused collection of functions to create bold text, italics, strikethroughs, underlines, anchor links, code blocks (inline and multi-line), equations, and headings (H1-H6). The library emphasizes simplicity and type safety, offering both individual named exports for each utility (e.g., `bold`, `h1`) and a bundled `md` object for convenience (e.g., `md.italic`). Unlike comprehensive Markdown parsers or renderers, `md-utils-ts` strictly focuses on outputting valid Markdown strings, making it ideal for scenarios where you need to construct Markdown content dynamically without heavy dependencies. Its release cadence is likely stable, with updates driven by new Markdown syntax needs or minor enhancements.","language":"javascript","status":"active","last_verified":"Tue Apr 21","install":{"commands":["npm install md-utils-ts"],"cli":null},"imports":["import { bold } from 'md-utils-ts'","import md from 'md-utils-ts'","import { codeBlock } from 'md-utils-ts'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import md, { bold, h1, anchor, codeBlock, equationBlock } from \"md-utils-ts\";\n\n// Create a main heading\nconst title = h1(\"Welcome to md-utils-ts!\");\n\n// Bold and italic text using individual exports and the 'md' object\nconst importantText = bold(\"This text is important.\") + \" \" + md.italic(\"And this is emphasized.\");\n\n// Create an anchor link\nconst githubLink = anchor(\"md-utils-ts GitHub\", \"https://github.com/TomPenguin/md-utils-ts\");\n\n// Generate a TypeScript code block\nconst tsExample = codeBlock(\"typescript\")(`\nfunction greet(name: string): string {\n  return \\`Hello, \\${name}!\\`;\n}\nconsole.log(greet(\"World\"));\n`);\n\n// Create an equation block\nconst pythagoreanTheorem = equationBlock(\"a^2 + b^2 = c^2\");\n\nconsole.log(title);\nconsole.log(importantText);\nconsole.log(githubLink);\nconsole.log(\"\\n--- TypeScript Example ---\\n\" + tsExample);\nconsole.log(\"\\n--- Math Example ---\\n\" + pythagoreanTheorem);\n","lang":"typescript","description":"Demonstrates importing both the default `md` object and named utility functions to create various Markdown elements like headings, bold text, links, code blocks, and equations.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}