cli-table2 is a Node.js utility designed for rendering highly customizable, unicode-aided tables directly within command-line interfaces. Released as version 0.2.0, it presents itself as an API-compatible, drop-in replacement for the original `cli-table` package, offering enhanced features such as column and row spanning, per-cell styling (including borders and padding), vertical text alignment, and automatic word wrapping. The package also provides more robust handling of ANSI color characters within cell text, ensuring correct rendering across multiple lines. Due to its very low version number and apparent lack of recent updates since its initial releases, it appears to be an unmaintained package, which may pose compatibility challenges with newer Node.js versions or introduce unpatched security vulnerabilities. It primarily targets CommonJS environments and has no stated release cadence, reflecting its abandoned status.
npm install cli-table2Verified import paths — ran on the pinned version, not inferred.
Demonstrates the creation of horizontal, vertical, and cross-tabulated CLI tables, including basic data insertion, column width specification, and custom character styling.
Consider migrating to actively maintained alternatives for critical applications or fork and maintain the package yourself if absolutely necessary.
Use CommonJS `require()` syntax: `const Table = require('cli-table2');` Ensure your project configuration or build tools are set up to handle CommonJS modules.Carefully review your project's dependency tree to ensure no malicious versions of `colors.js` are installed. If `colors.js` is used, consider removing it or switching to safer, actively maintained alternatives like `chalk` or `colorette` for CLI coloring.
Change your import statement to `const Table = require('cli-table2');` and ensure your environment is configured to properly handle CommonJS modules.Access the exported constructor directly without destructuring: `const Table = require('cli-table2');`.If your project uses ES Modules, consider rewriting your application to use an alternative library that supports ESM, or configure your build system (e.g., Webpack, Rollup) to transpile CommonJS modules for browser/ESM compatibility.
No dependency data recorded yet.