table-js is a high-performance JavaScript library designed for efficiently viewing and editing tabular data. It leverages ES modules exclusively, meaning consumers must use a module-aware bundler like Webpack or Rollup for browser environments, as it does not ship pre-built artifacts. The current stable version is 9.4.0, with minor and patch releases occurring frequently, typically driven by dependency updates or internal chore tasks. Its key differentiator is its focus on speed and its integration within the bpmn.io ecosystem, often used alongside `diagram-js` and `inferno` for rich web applications requiring structured data display and interaction.
npm install table-jsVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic setup of a table-js instance by creating a container and rendering a simple table using a minimal configuration. It implicitly accounts for Inferno as a peer dependency.
Check the `peerDependencies` range for `diagram-js` in `package.json` and ensure your installed `diagram-js` version falls within that range. Upgrade `diagram-js` if necessary.
Always use ES module `import` syntax. If targeting browsers, use an ES module-aware bundler (e.g., Webpack, Rollup, Vite). For Node.js, ensure your project is configured for ESM (e.g., `"type": "module"` in `package.json`).
Integrate `table-js` into your existing build pipeline using a bundler (Webpack, Rollup, Parcel). Configure the bundler to resolve ES modules and process any necessary assets.
Ensure your development and production environments run a Node.js version compatible with the latest `table-js` release. Check the `engines.node` field in `package.json`.
Change `const Table = require('table-js');` to `import Table from 'table-js';` (or `import { NamedExport } from 'table-js';`). Ensure your Node.js project or bundler is set up for ES Modules.Install the peer dependencies: `npm install inferno@^5 diagram-js@^15` (adjust versions to match the peer dependency range specified by `table-js`).
Use an ES module-aware bundler (e.g., Webpack, Rollup, Parcel) to bundle `table-js` and its dependencies for the browser. Configure your `script` tag with `type="module"` if using native ES modules and not bundling, though bundling is recommended for production.