{"repo":"privatenumber/md-pen","free":true,"listed":false,"github":"https://github.com/privatenumber/md-pen","clone":"git clone https://github.com/privatenumber/md-pen.git","description":"Utilities for formatting Markdown","language":"TypeScript","stars":45,"topics":["markdown","utils","format","gfm","table","utilities"],"license":"MIT","category":"productivity","readme_excerpt":"md-pen Typed utilities for formatting Markdown. GFM (GitHub-Flavored Markdown) first. Features - Zero dependencies - Full TypeScript with exported types - Every output verified against a CommonMark parser - GitHub-compatible (audited against cmark-gfm) - Functions compose naturally Install Usage A default export is also available: import md from 'md-pen' then md.bold() , md.table() , etc. API Inline code(text) Wraps in backtick code span. Handles backticks in content automatically. bold(text) italic(text) strikethrough(text) link(url, text?, options?) Markdown by default. Falls back to HTML when options go beyond what markdown supports. [!NOTE] link(url, text) and image(url, alt) take URL first — matches HTML's text , not Markdown's text . image(url, alt?, options?) Same fallback principle as link . Block heading(text, level?) / h1 - h6 blockquote(text) Prefixes each line with . codeBlock(code, language?) Fenced code block. Handles content containing backtick fences. ts // const x = 1 // table(rows, options?) First row is the header. Cells auto-stringify numbers and booleans. Ragged rows are padded. Also accepts an array of objects (keys become headers): Use columns to control order, filter, and rename. Each entry is a key or [key, header] tuple: Use html: true for block content in cells (code blocks, lists, etc.): Alignment: 'left' , 'center' , 'right' , 'none' [!NOTE] In markdown mode, newlines become and boundary whitespace becomes &nbsp; , so those literal strings can't b","default_branch":null,"files":null,"tree":[],"storefront":"/r/privatenumber","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/privatenumber/md-pen/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}