{"id":22694489,"url":"https://github.com/jiangweixian/functional-md","last_synced_at":"2025-04-13T01:22:52.058Z","repository":{"id":49220291,"uuid":"361801179","full_name":"JiangWeixian/functional-md","owner":"JiangWeixian","description":"render markdown functional","archived":false,"fork":false,"pushed_at":"2021-07-08T16:37:35.000Z","size":399,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-09T23:24:04.515Z","etag":null,"topics":["functional-programming","github","markdown"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JiangWeixian.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-26T15:31:27.000Z","updated_at":"2021-12-29T06:52:47.000Z","dependencies_parsed_at":"2022-09-08T01:12:00.720Z","dependency_job_id":null,"html_url":"https://github.com/JiangWeixian/functional-md","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JiangWeixian%2Ffunctional-md","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JiangWeixian%2Ffunctional-md/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JiangWeixian%2Ffunctional-md/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JiangWeixian%2Ffunctional-md/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JiangWeixian","download_url":"https://codeload.github.com/JiangWeixian/functional-md/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228996064,"owners_count":18003633,"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":["functional-programming","github","markdown"],"created_at":"2024-12-10T03:08:22.451Z","updated_at":"2024-12-10T03:08:23.198Z","avatar_url":"https://github.com/JiangWeixian.png","language":"TypeScript","readme":"# functional-md\n\u003e render markdown content functional\n\n[![npm](https://img.shields.io/npm/v/functional-md)](https://github.com/JiangWeixian/functional-md) [![NPM](https://img.shields.io/npm/l/functional-md)](https://github.com/JiangWeixian/functional-md)\n\n## install\n\n```console\nnpm install functional-md\n```\n\n## usage\n\n### `table`\n\n```ts\nimport { table } from 'functional-md'\n\ntable({\n  columns: [\n    {\n      dataIndex: 'id',\n      title: 'ID'\n    },\n    {\n      dataIndex: '',\n      title: 'NAME',\n      render: (v) =\u003e v.name\n    }\n  ],\n  dataSource: [\n    {\n      id: 1,\n      name: 'jw'\n    },\n    {\n      id: 2,\n      name: 'jiangweixian'\n    }\n  ]\n})\n```\n\nwill output\n\n|ID|NAME|\n|-----|-----|\n|1|jw|\n|2|jiangweixian|\n\n### `menu`\n\n```ts\nmenu({\n  dataSource: [\n    {\n      title: 'jw',\n      items: [\"1.1\", \"1.2\"]\n    },\n    {\n      title: 'jiangweixian',\n      items: [\n        {\n          title: \"2.1\"\n        },\n      ]\n    },\n  ]\n})\n```\n\nwill output\n\n- jw\n  - 1.1\n  - 1.2\n- jiangweixian\n  - 2.1\n\n### `list`\n\n```ts\nlist({ dataSource: ['1', '2'], limit: 1 })\n```\n\nwill output\n\n- 1\n- ...\n\n### `overflow-list`\n\n```ts\noverflowList({ list: ['a', 'b', 'c'], max: 2 })\n```\n\nwill output\n\na, b `+1`\n\n### `badge`\n\n```ts\nbadge({ value: 1 }\n```\n\nwill output\n\n`+1`\n\n### `code`\n\n```ts\ncode({ language: 'tsx', value: 'const a = 1' })\n```\n\nwill output\n\n```tsx\nconst a = 1\n```\n\n### `image`\n\n```ts\nimage({ alt: 'alt', src: 'https://github.com' })\n```\n\n### `link`\n\n```ts\nlink({ alt: 'alt', href: 'https://github.com' })\n```\n\n## features\n\n- table\n- menu\n- list\n- overflow-list\n- badge\n- code\n- image\n- link\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiangweixian%2Ffunctional-md","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjiangweixian%2Ffunctional-md","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiangweixian%2Ffunctional-md/lists"}