{"id":25928,"library":"mdt2json-ts","title":"mdt2json-ts","description":"mdt2json-ts is a TypeScript-based transpiler that converts Markdown tables into minified JSON arrays. Version 0.1.0 is the initial release, with no active release cadence. It differentiates from similar tools by producing compact JSON output without intermediate steps, targeting developers who need to extract structured data from Markdown tables programmatically. The package ships with TypeScript type definitions for type-safe usage.","status":"active","version":"0.1.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","typescript"],"install":[{"cmd":"npm install mdt2json-ts","lang":"bash","label":"npm"},{"cmd":"yarn add mdt2json-ts","lang":"bash","label":"yarn"},{"cmd":"pnpm add mdt2json-ts","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only package; CommonJS require will fail.","wrong":"const mdt2json = require('mdt2json-ts')","symbol":"default","correct":"import mdt2json from 'mdt2json-ts'"},{"note":"Named export, not a subpath export.","wrong":"import { parseTable } from 'mdt2json-ts/parseTable'","symbol":"parseTable","correct":"import { parseTable } from 'mdt2json-ts'"},{"note":"Named export, not default.","wrong":"import MarkdownTableParser from 'mdt2json-ts'","symbol":"MarkdownTableParser","correct":"import { MarkdownTableParser } from 'mdt2json-ts'"}],"quickstart":{"code":"import mdt2json from 'mdt2json-ts';\n\nconst markdown = `| Name | Age |\n|------|-----|\n| Alice | 30 |\n| Bob | 25 |`;\n\nconst json = mdt2json(markdown);\nconsole.log(json);\n// Output: [{\"Name\":\"Alice\",\"Age\":\"30\"},{\"Name\":\"Bob\",\"Age\":\"25\"}]","lang":"typescript","description":"Demonstrates converting a Markdown table string to a minified JSON array using the default export."},"warnings":[{"fix":"Ensure each row is on its own line.","message":"Table rows must be separated by newlines; inline tables not supported.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use pipe characters and include the separator line.","message":"Only pipe-separated tables are supported; GFM tables with dashes only.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use JSON.stringify(result, null, 2) for formatting.","message":"JSON output is minified; no pretty-print option available.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use ESM imports or set type: module in package.json.","cause":"Trying to require an ESM-only module with CommonJS.","error":"SyntaxError: Unexpected token 'export'"},{"fix":"Use import mdt2json from 'mdt2json-ts'","cause":"Using named import incorrectly as default.","error":"TypeError: mdt2json is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}