Registry / data / table-parser-base

table-parser-base

JSON →
library0.0.5jsnpmunverified

table-parser-base is a lightweight JavaScript utility library designed to facilitate the transformation of tabular data structures. Primarily, it offers functions to convert between an `ArrayTable` format (an object with separate `headers` and `rows` arrays) and an `ObjectTable` format (an array of objects, where each object represents a row). Currently at version 0.0.5, the package is in a very early stage of development, implying an ad-hoc release cadence without a fixed schedule and potential for rapid iteration on its API. Its core differentiation lies in providing simple, focused, and stream-capable utilities for these specific table data model conversions, often serving as foundational components for broader data parsing or manipulation pipelines. It emphasizes an asynchronous, iterable approach for processing object tables, which is suitable for potentially large datasets.

npm install table-parser-base
INSTALL
IMPORT
SIG · TABLE-PARSER-BASE
T
table-parser-base
datajavascriptv0.0.5
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

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

createObjectTable
✓ import { createObjectTable } from 'table-parser-base'
✗ const { createObjectTable } = require('table-parser-base')
This package is ESM-only and requires `import` statements. For dynamic loading or older Node.js versions, `await import()` within an async context is necessary.
createArrayTable
✓ import { createArrayTable } from 'table-parser-base'
✗ const createArrayTable = require('table-parser-base').createArrayTable
Ensure your environment supports ES Modules. Direct CommonJS `require()` is not supported.

This quickstart demonstrates how to import and use `createObjectTable` to transform an array-based table structure into an iterable object-based table, logging each row.

import { createObjectTable } from 'table-parser-base' const arrayTable = { headers: ['id', 'name', 'email'], rows: [ [1, 'John Doe', 'john-doe@gmail.com'], [2, 'Peter Smith', 'petersmith22@outlook.com'], [3, 'Julia Jones', 'jjones778@gmail.com'] ] } async function processTable() { const objectTable = await createObjectTable(arrayTable) console.log('--- Converted to ObjectTable ---') for await (const item of objectTable) { console.log(item) } } processTable()
Debug
Known issues
breakingAs a pre-1.0.0 package (version 0.0.5), `table-parser-base` does not adhere to semantic versioning strictly. Any minor or patch release can introduce breaking changes without prior notice, leading to unexpected behavior or API shifts.
fix
Always review the package's changelog or GitHub repository for breaking changes between versions. It is recommended to pin exact versions (`0.0.x`) in your `package.json` to avoid unexpected updates.
affects: >=0.0.1
gotchaThis package is exclusively designed for ES Module (ESM) environments. Attempting to use it with CommonJS `require()` syntax will result in errors.
fix
Ensure your project is configured for ES Modules by setting `"type": "module"` in your `package.json` or by using `.mjs` file extensions. Use `import` statements exclusively.
affects: >=0.0.1
gotchaThe API surface of `table-parser-base` is considered volatile due to its early development stage. Function signatures, names, or overall structure might change in future versions without extensive deprecation cycles.
fix
Thoroughly test your application when upgrading `table-parser-base` to any new version, even minor ones. Be prepared for potential refactoring if API changes are introduced.
affects: <=0.x.x
Errors
Common errors & fixes
SyntaxError: Cannot use import statement outside a module
You are attempting to use an ES Module `import` statement in a CommonJS context (e.g., a `.js` file without `"type": "module"` in `package.json` or a `.cjs` file).
fix
Configure your project to use ES Modules by adding `"type": "module"` to your `package.json` file, or ensure the file containing the import is named with a `.mjs` extension. Alternatively, run Node.js with `--input-type=module`.
TypeError: createObjectTable is not a function
This usually indicates an incorrect import, a misspelling, or attempting to destructure from the `require()` call which is not supported for ESM-only packages, or not `await`ing the dynamic import.
fix
Verify that `import { createObjectTable } from 'table-parser-base'` is correctly written. If using dynamic imports, ensure it's `const { createObjectTable } = await import('table-parser-base')` within an `async` function or at the top level of an ES Module.
Upgrade
Version history
0.0.5latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
22 hits · last 30 days
node
18
Anthropic
1
OpenAI (training)
1
Resources
table-parser-base — npm install table-parser-base · libregistry