{"id":13527565,"url":"https://github.com/remarkjs/strip-markdown","last_synced_at":"2025-12-12T03:58:30.216Z","repository":{"id":26365274,"uuid":"29814450","full_name":"remarkjs/strip-markdown","owner":"remarkjs","description":"plugin remove Markdown formatting","archived":false,"fork":false,"pushed_at":"2023-10-25T14:39:36.000Z","size":508,"stargazers_count":123,"open_issues_count":0,"forks_count":23,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-04-08T13:22:30.920Z","etag":null,"topics":["clean","markdown","remark","remark-plugin","remove","strip"],"latest_commit_sha":null,"homepage":"http://remarkjs.github.io/strip-markdown","language":"JavaScript","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/remarkjs.png","metadata":{"funding":{"github":"unifiedjs","open_collective":"unified"},"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-01-25T13:11:27.000Z","updated_at":"2024-04-06T08:14:19.000Z","dependencies_parsed_at":"2023-07-13T16:31:27.465Z","dependency_job_id":"de5f7168-361a-45cc-a0f0-05b32e294198","html_url":"https://github.com/remarkjs/strip-markdown","commit_stats":{"total_commits":129,"total_committers":7,"mean_commits":"18.428571428571427","dds":"0.10077519379844957","last_synced_commit":"d4ac18c24674a1df49cbc0ad472d0f334686dfb0"},"previous_names":["wooorm/strip-markdown"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remarkjs%2Fstrip-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remarkjs%2Fstrip-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remarkjs%2Fstrip-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remarkjs%2Fstrip-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remarkjs","download_url":"https://codeload.github.com/remarkjs/strip-markdown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"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":["clean","markdown","remark","remark-plugin","remove","strip"],"created_at":"2024-08-01T06:01:51.927Z","updated_at":"2025-12-12T03:58:30.178Z","avatar_url":"https://github.com/remarkjs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/unifiedjs","https://opencollective.com/unified"],"categories":["JavaScript"],"sub_categories":[],"readme":"# strip-markdown\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n**[remark][]** plugin to remove markdown formatting.\nThis essentially removes everything but paragraphs and text.\n\n\u003e This is one of the first remark plugins, before prefixing with `remark-` got\n\u003e cool.\n\n## Contents\n\n* [What is this?](#what-is-this)\n* [When should I use this?](#when-should-i-use-this)\n* [Install](#install)\n* [Use](#use)\n* [API](#api)\n  * [`unified().use(stripMarkdown[, options])`](#unifiedusestripmarkdown-options)\n  * [`Handler`](#handler)\n  * [`Options`](#options)\n* [Types](#types)\n* [Compatibility](#compatibility)\n* [Security](#security)\n* [Contribute](#contribute)\n* [License](#license)\n\n## What is this?\n\nThis package is a [unified][] ([remark][]) plugin to remove most nodes so as to\njust leave text.\n\n## When should I use this?\n\nYou can use this if you want to ignore the syntax of markdown.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install strip-markdown\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport stripMarkdown from 'https://esm.sh/strip-markdown@6'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import stripMarkdown from 'https://esm.sh/strip-markdown@6?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\n```js\nimport {remark} from 'remark'\nimport strip from 'strip-markdown'\n\nconst file = await remark()\n  .use(strip)\n  .process('Some *emphasis*, **importance**, and `code`.')\n\nconsole.log(String(file))\n```\n\nYields:\n\n```txt\nSome emphasis, importance, and code.\n```\n\n## API\n\nThis package exports no identifiers.\nThe default export is [`stripMarkdown`][api-strip-markdown].\n\n### `unified().use(stripMarkdown[, options])`\n\nRemove markdown formatting.\n\n* remove `code`, `html`, `horizontalRule`, `table`, `toml`, `yaml`, and\n  their content\n* render everything else as simple paragraphs without formatting\n* uses `alt` text for images\n\n###### Parameters\n\n* `option` ([`Options`][api-options], optional)\n  — configuration\n\n###### Returns\n\nTransform ([`Transformer`][unified-transformer]).\n\n### `Handler`\n\nTransform a node (TypeScript type).\n\n###### Parameters\n\n* `node` ([`Node`][mdast-node])\n  — node\n\n###### Returns\n\nResult (`Array\u003cNode\u003e` or `Node`).\n\n### `Options`\n\nConfiguration (TypeScript type).\n\n###### Fields\n\n* `keep` (`Array\u003cstring\u003e`, optional)\n  — list of node types to leave unchanged\n* `remove` (`Array\u003c[string, Handler] | string\u003e`, optional)\n  — list of node types to remove (or replace, with handlers)\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional types [`Handler`][api-handler] and\n[`Options`][api-options].\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line, `strip-markdown@6`,\ncompatible with Node.js 16.\n\n## Security\n\nUse of `strip-markdown` does not involve **[rehype][]** (**[hast][]**) or user\ncontent so there are no openings for [cross-site scripting (XSS)][xss] attacks.\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways\nto get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n\u003c!-- Definitions --\u003e\n\n[build-badge]: https://github.com/remarkjs/strip-markdown/workflows/main/badge.svg\n\n[build]: https://github.com/remarkjs/strip-markdown/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/remarkjs/strip-markdown.svg\n\n[coverage]: https://codecov.io/github/remarkjs/strip-markdown\n\n[downloads-badge]: https://img.shields.io/npm/dm/strip-markdown.svg\n\n[downloads]: https://www.npmjs.com/package/strip-markdown\n\n[size-badge]: https://img.shields.io/bundlejs/size/strip-markdown\n\n[size]: https://bundlejs.com/?q=strip-markdown\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/remarkjs/remark/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[health]: https://github.com/remarkjs/.github\n\n[contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md\n\n[support]: https://github.com/remarkjs/.github/blob/main/support.md\n\n[coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md\n\n[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[hast]: https://github.com/syntax-tree/hast\n\n[mdast-node]: https://github.com/syntax-tree/mdast#nodes\n\n[rehype]: https://github.com/rehypejs/rehype\n\n[remark]: https://github.com/remarkjs/remark\n\n[typescript]: https://www.typescriptlang.org\n\n[unified]: https://github.com/unifiedjs/unified\n\n[unified-transformer]: https://github.com/unifiedjs/unified#transformer\n\n[api-handler]: #handler\n\n[api-options]: #options\n\n[api-strip-markdown]: #unifiedusestripmarkdown-options\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremarkjs%2Fstrip-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremarkjs%2Fstrip-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremarkjs%2Fstrip-markdown/lists"}