Registry / serialization / mdt2json-cli

mdt2json-cli

JSON →
library0.1.0jsnpmunverified

A CLI tool that transpiles Markdown tables into minified JSON arrays. Current stable version is 0.1.0. Created as an early-stage utility, it has a very specific focus and limited scope. No release cadence established. Key differentiators: minimal output, no dependencies, works as a command-line filter. However, it has no tests, no documentation, and is likely unstable.

npm install mdt2json-cli
INSTALL
IMPORT
SIG · MDT2JSON-CLI
M
mdt2json-cli
serializationjavascriptv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import mdt2json from 'mdt2json-cli'
const mdt2json = require('mdt2json-cli')
Package is ESM-only; CommonJS require will fail.
mdt2json
import { mdt2json } from 'mdt2json-cli'
const { mdt2json } = require('mdt2json-cli')
Named export also available; CommonJS require will fail.
transform
import { transform } from 'mdt2json-cli'
import transform from 'mdt2json-cli'
transform is a named export; default export is the CLI function itself.

Converts a Markdown table row from stdin into a compact JSON array.

echo '| a | b |\n|---|---|\n| 1 | 2 |' | npx mdt2json-cli
mdt2json --version
Debug
Known issues
gotchaPackage version 0.1.0 has zero tests, zero documentation, and is not production-ready.
fix
Avoid using in production until stable release.
affects: =0.1.0
breakingESM-only: CommonJS require() will throw MODULE_NOT_FOUND.
fix
Use import syntax or dynamic import().
affects: >=0.1.0
gotchaCLI expects input via stdin; no file argument accepted.
fix
Pipe file contents: cat input.md | npx mdt2json-cli
affects: =0.1.0
gotchaOutput is minified JSON; no pretty-print option.
fix
Use jq or other tools to format output if needed.
affects: =0.1.0
Errors
Common errors & fixes
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'mdt2json-cli'
Package is ESM-only but project uses CommonJS require().
fix
Change to import statement or set { "type": "module" } in package.json.
TypeError: mdt2json is not a function
Named import used as default import incorrectly.
fix
Use import { mdt2json } from 'mdt2json-cli' or import mdt2json from 'mdt2json-cli'.
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
mdt2json-cli — npm install mdt2json-cli · libregistry