A lightweight code formatter supporting JavaScript, HTML, CSS, JSON, XML, and SQL with landscaping and compression. Current stable version: 0.0.2. Released irregularly; no major updates since initial publish. Key differentiator: minimal API and support for multiple languages, but limited configurability compared to Prettier or ESLint. Ships TypeScript types.
npm install code-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Formats a JSON string with indentation options using the default export.
Avoid using preserveComments for non-CSS/XML methods.
Use `import formatter from 'code-formatter'` instead of `import { formatter } from 'code-formatter'`.Ensure method is lowercase.
N/A
Replace `import { formatter } from 'code-formatter'` with `import formatter from 'code-formatter'`.Install package: `npm install code-formatter`.
Ensure content is a string before passing to formatter.
No dependency data recorded yet.