{"id":27610375,"url":"https://github.com/openinf/openinf-util-md-table","last_synced_at":"2025-07-23T14:04:44.212Z","repository":{"id":39579828,"uuid":"330315551","full_name":"OpenINF/openinf-util-md-table","owner":"OpenINF","description":"Common Markdown table-related utilities","archived":false,"fork":false,"pushed_at":"2025-04-21T09:34:25.000Z","size":268,"stargazers_count":4,"open_issues_count":18,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-21T10:33:58.031Z","etag":null,"topics":["commonjs","commonjs-module","commonjs-package","helpers","helpers-library","javascript","javascript-library","json","markdown","nodejs","nodejs-module","npm","npm-package","table","typescript","typescript-library","typescript-package","utilities"],"latest_commit_sha":null,"homepage":"https://github.com/OpenINF/openinf-util-md-table#readme","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenINF.png","metadata":{"funding":{"github":[]},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-01-17T04:42:07.000Z","updated_at":"2024-05-24T16:14:44.000Z","dependencies_parsed_at":"2024-01-03T01:28:48.437Z","dependency_job_id":"e6f247f0-4dc6-4266-af8c-a1912df58e59","html_url":"https://github.com/OpenINF/openinf-util-md-table","commit_stats":null,"previous_names":["openinf/util-md-table"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenINF%2Fopeninf-util-md-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenINF%2Fopeninf-util-md-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenINF%2Fopeninf-util-md-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenINF%2Fopeninf-util-md-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenINF","download_url":"https://codeload.github.com/OpenINF/openinf-util-md-table/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250339340,"owners_count":21414342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commonjs","commonjs-module","commonjs-package","helpers","helpers-library","javascript","javascript-library","json","markdown","nodejs","nodejs-module","npm","npm-package","table","typescript","typescript-library","typescript-package","utilities"],"created_at":"2025-04-22T23:27:04.969Z","updated_at":"2025-04-22T23:27:06.049Z","avatar_url":"https://github.com/OpenINF.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://open.inf.is\"\u003e\n  \u003cimg\n    src=\"https://open.inf.is/assets/img/svg/logogram-color.svg\"\n    alt=\"OpenINF logo\"\n    title=\"OpenINF\"\n    align=\"right\"\n    height=\"96\"\n    width=\"96\"\n  /\u003e\n\u003c/a\u003e\n\n\u003cdiv align=\"left\"\u003e\n\n## `@openinf/util-md-table`\n\n\u003e Common Markdown table-related utilities\n\n\u003cbr /\u003e\n\n[!['View on npm'][npm-badge--shields]][npm-badge-url]\n[!['License: MIT/Apache-2.0'][license-badge--shields]][license-badge-url]\n\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\nThe high-level goal of `@openinf/util-md-table` is to serve as a Node.js package\ncontaining utilities for **common operations on Markdown tables** allowing users\nto make use of them in new ways. We are constantly working to improve this\nrepository, so please feel free to [contribute](#contributing) if you notice any\nomissions or errors.\n\nThanks!\n\n\u003cbr /\u003e\n\n\u003cdetails id=\"platform--node-js-lts\"\u003e\n\t\u003csummary\u003e\n\t\t\u003ca\n\t\t\thref=\"#platform--node-js-lts\"\n\t\t\ttitle=\"Platform: Node.js LTS\"\n\t\t\u003e\n\t\t\t\u003cimg\n\t\t\t\tsrc=\"https://img.shields.io/badge/Node.js-LTS-black?logo=Node.js\u0026logoColor=lightgreen\u0026color=2a2a2a\u0026labelColor=black\"\n\t\t\t\talt=\"Platform: Node.js LTS\"\n\t\t\t/\u003e\n\t\t\u003c/a\u003e\n\t\u003c/summary\u003e\n\t\u003cdiv align=\"left\"\u003e\u003cbr /\u003e\n\t\t\u003ca\n\t\t\ttarget=\"_blank\"\n\t\t\ttitle=\"Node.js release schedule\"\n\t\t\thref=\"https://github.com/nodejs/release#release-schedule\"\n\t\t\u003e\n\t\t\t\u003cstrong\u003eSupported Node.js Environments\u003c/strong\u003e\n\t\t\u003c/a\u003e\u003cbr /\u003e\u003cbr /\u003e\n\n- [ ] v4：Argon (Ar)\n- [ ] v6：Boron (B)\n- [ ] v8：Carbon (C)\n- [ ] v10：Dubnium (Db)\n- [ ] v12：Erbium (Er)\n- [x] v14：Fermium (Fm)\n- [x] v16：Gallium (Ga)\n- [x] v18：Hydrogen (H)\n\u003c!-- TODO\n- [x] v20: Iron (Fe) --\u003e\n\n\u003c/div\u003e\u003c/details\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Code Style: Prettier][prettier-badge]][prettier-url]\n[![Commit Style: Conventional Commits][conventional-commits-badge]][conventional-commits-url]\n[![Chat on Matrix][matrix-badge--shields]][matrix-url]\n\n\u003c/div\u003e\n\n\u003cbr /\u003e\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n### Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API](#api)\n- [Contributing](#contributing)\n- [License](#license)\n\n\u003cbr /\u003e\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\n\t\u003c!-- markdownlint-disable-next-line line-length --\u003e\n\t\u003ch3 id=\"installation\" align=\"left\"\u003eInstallation \u003ca href=\"##\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/nodejs/corepack/main/icon.svg?sanitize=true\" alt=\"Corepack logo\" title=\"Corepack friendly\" align=\"right\" height=\"24\" width=\"24\" /\u003e\u003c/a\u003e\u003c/h3\u003e\n\u003c/summary\u003e\n\n\u003cbr /\u003e\n\n`@openinf/util-md-table` runs on\n[supported versions of Node.js](#platform--node-js-lts) and is available via\n**`npm`**, **`pnpm`**, or **`yarn`**.\n\n**Using the npm CLI**\n\n\u003csup\u003eSee the\n[official documentation for this command](https://docs.npmjs.com/cli/commands/npm-install)\nfor more information.\u003c/sup\u003e\n\n```shell\nnpm i @openinf/util-md-table\n```\n\n**Using the pnpm CLI**\n\n\u003csup\u003eSee the [official documentation for this command](https://pnpm.io/cli/add)\nfor more information.\u003c/sup\u003e\n\n```shell\npnpm add @openinf/util-md-table\n```\n\n**Using the Yarn 1 CLI (Classic)**\n\n\u003csup\u003eSee the\n[official documentation for this command](https://classic.yarnpkg.com/en/docs/cli/add)\nfor more information.\u003c/sup\u003e\n\n```shell\nyarn add @openinf/util-md-table\n```\n\n\u003cbr /\u003e\n\n\u003c/details\u003e\n\n### Usage\n\n```ts\nimport { mdTbl2json } from '@openinf/util-md-table';\n\nconst sampleTable = [\n  '| Col1  | Col2  | Col3  | Col4  |',\n  '|:-----:|:-----:|:-----:|:-----:|',\n  '| one   | two   | three | four  |',\n  '| Fee   | Fie   | Foe   | Fum   |',\n].join('\\n');\n\nconst sampleTblObject = mdTbl2json(sampleTable, (v) =\u003e v.toLowerCase());\n\nconsole.log(sampleTblObject);\n```\n\n```console\n[\n  { col1: 'one', col2: 'two', col3: 'three', col4: 'four' },\n  { col1: 'fee', col2: 'fie', col3: 'foe', col4: 'fum' }\n]\n```\n\n\u003cbr /\u003e\u003cbr /\u003e\n\n### API\n\n\u003ca name=\"mdTbl2json\"\u003e\u003c/a\u003e\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/Mqxx/GitHub-Markdown/main/blockquotes/badge/light-theme/tip.svg\"\u003e\n  \u003cimg alt=\"Tip\" src=\"https://raw.githubusercontent.com/Mqxx/GitHub-Markdown/main/blockquotes/badge/dark-theme/tip.svg\"\u003e\n\u003c/picture\u003e\u003cbr\u003e\n\nThis API will be deprecated in the next release in favor of one that follows [Web Platform Design Principles](https://github.com/OpenINF/openinf-util-md-table/issues/187).\n\n#### mdTbl2json(mdTbl, cellTransform, attribCellTransform) ⇒ \u003ccode\u003eArray\u0026lt;Object\u0026gt;\u003c/code\u003e\n\n**Kind**: global function\n\n| Param               | Type                                            | Description                              |\n| ------------------- | ----------------------------------------------- | ---------------------------------------- |\n| mdTbl               | \u003ccode\u003estring\u003c/code\u003e                             | A markdown table as a string.            |\n| cellTransform       | \u003ccode\u003efunction\u003c/code\u003e \\| \u003ccode\u003eundefined\u003c/code\u003e | A function run on contents of each cell. |\n| attribCellTransform | \u003ccode\u003efunction\u003c/code\u003e \\| \u003ccode\u003eundefined\u003c/code\u003e | A transform only for attribute cells.    |\n\n\u003cbr /\u003e\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n### Contributing\n\nPull requests are welcome. For major changes, please open an issue first to\ndiscuss what you would like to change. If for whatever reason you spot something\nto fix but cannot patch it yourself, please [open an issue][].\n\n\u003cbr /\u003e\n\n### License\n\nThis project is licensed under either of\n\n- [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)\n- [MIT license](https://opensource.org/licenses/MIT)\n\nat your option.\n\nThe [SPDX](https://spdx.dev) license identifier for this project is\n`MIT OR Apache-2.0`.\n\n\u003cbr /\u003e\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n### Show Your Support\n\n\u003cbr /\u003e\n\nIf you like the project (or want to bookmark it)\u0026nbsp;\u0026mdash;\u003cbr /\u003e\n\u0026mdash;\u0026nbsp;[give it a star ⭐️][]\u0026nbsp;\u0026mdash;\u0026nbsp;it will greatly encourage\nus.\n\n\u003cbr /\u003e\u003cbr /\u003e\n\n\u003ca title=\"The OpenINF website\" href=\"https://open.inf.is\" rel=\"author\"\u003e\n  \u003cimg alt=\"The OpenINF logo\" height=\"32px\" width=\"32px\" src=\"https://open.inf.is/assets/img/svg/logogram-color.svg\" /\u003e\n\u003c/a\u003e\n\n\u003c/div\u003e\n\n\u003c!-- BEGIN LINK DEFINITIONS --\u003e\n[conventional-commits-badge]: https://img.shields.io/badge/commit%20style-Conventional-%23fa6673?logoColor=white\u0026logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMCAzMCI+PHBhdGggc3R5bGU9ImZpbGw6ICNGRkYiIGQ9Ik0xNSwyQTEzLDEzLDAsMSwxLDIsMTUsMTMsMTMsMCwwLDEsMTUsMm0wLTJBMTUsMTUsMCwxLDAsMzAsMTUsMTUsMTUsMCwwLDAsMTUsMFoiLz48L3N2Zz4K 'Commit Style: Conventional Commits'\n[conventional-commits-url]: https://www.conventionalcommits.org 'Commit Style: Conventional Commits'\n[give it a star ⭐️]: https://github.com/OpenINF/openinf-util-md-table/stargazers\n[license-badge--shields]: https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg?logo=github 'License: MIT/Apache 2.0'\n[license-badge-url]: #license 'License: MIT/Apache 2.0'\n[matrix-badge--shields]: https://img.shields.io/badge/matrix-join%20chat-%2346BC99?logo=matrix 'Chat on Matrix'\n[matrix-url]: https://matrix.to/#/#openinf-space:matrix.org 'You\u0026apos;re invited to talk on Matrix'\n[npm-badge--shields]: https://img.shields.io/npm/v/@openinf/util-md-table/latest.svg?logo=npm\u0026color=fe7d37 'View on npm'\n[npm-badge-url]: https://www.npmjs.com/package/@openinf/util-md-table#top 'View on npm'\n[open an issue]: https://github.com/OpenINF/openinf-util-md-table/issues\n[prettier-badge]: https://img.shields.io/badge/code_style-Prettier-ff69b4.svg?logo=prettier 'Code Style: Prettier'\n[prettier-url]: https://prettier.io/playground 'Code Style: Prettier'\n[project-status-badge]: https://img.shields.io/badge/project%20status-under%20construction-orange 'Project Status: Under construction badge'\n\u003c!-- END LINK DEFINITIONS --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopeninf%2Fopeninf-util-md-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopeninf%2Fopeninf-util-md-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopeninf%2Fopeninf-util-md-table/lists"}