{"id":15652010,"url":"https://github.com/jonschlinkert/markdown-utils","last_synced_at":"2026-03-09T22:31:22.652Z","repository":{"id":23163304,"uuid":"26518976","full_name":"jonschlinkert/markdown-utils","owner":"jonschlinkert","description":"Convert plain text into snippets of markdown. ","archived":false,"fork":false,"pushed_at":"2018-07-05T07:19:37.000Z","size":69,"stargazers_count":29,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-02-24T20:24:14.802Z","etag":null,"topics":["convert","javascript","markdown","nodejs","snippets","text","utils"],"latest_commit_sha":null,"homepage":"https://github.com/jonschlinkert","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/jonschlinkert.png","metadata":{"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}},"created_at":"2014-11-12T04:20:26.000Z","updated_at":"2025-12-09T13:13:34.000Z","dependencies_parsed_at":"2022-08-21T20:50:14.820Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/markdown-utils","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/jonschlinkert/markdown-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fmarkdown-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fmarkdown-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fmarkdown-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fmarkdown-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/markdown-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fmarkdown-utils/sbom","scorecard":{"id":531912,"data":{"date":"2025-08-11","repo":{"name":"github.com/jonschlinkert/markdown-utils","commit":"2b9a26f5d6f79948a10265c0c815191c74cdc6a3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T05:56:18.328Z","repository_id":23163304,"created_at":"2025-08-20T05:56:18.328Z","updated_at":"2025-08-20T05:56:18.328Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30016515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T17:00:27.440Z","status":"ssl_error","status_checked_at":"2026-03-02T17:00:03.402Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["convert","javascript","markdown","nodejs","snippets","text","utils"],"created_at":"2024-10-03T12:40:56.305Z","updated_at":"2026-03-09T22:31:22.621Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# markdown-utils [![NPM version](https://img.shields.io/npm/v/markdown-utils.svg?style=flat)](https://www.npmjs.com/package/markdown-utils) [![NPM monthly downloads](https://img.shields.io/npm/dm/markdown-utils.svg?style=flat)](https://npmjs.org/package/markdown-utils) [![NPM total downloads](https://img.shields.io/npm/dt/markdown-utils.svg?style=flat)](https://npmjs.org/package/markdown-utils) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/markdown-utils.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/markdown-utils)\n\n\u003e Tiny helpers for creating consistenly-formatted markdown snippets.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save markdown-utils\n```\n\n## Usage\n\n```js\nconst mdu = require('markdown-utils');\n```\n\n## API\n\n### [.blockquote](index.js#L24)\n\nCreate a markdown-formatted blockquote.\n\n**Params**\n\n* `str` **{String}**\n\n**Example**\n\n```js\nutils.blockquote('This is a blockquote');\n//=\u003e '\u003e This is a blockquote'\n```\n\n### [.code](index.js#L37)\n\nCreate a markdown-formatted `\u003ccode\u003e\u003c/code\u003e` snippet.\n\n**Params**\n\n* `str` **{String}**\n\n**Example**\n\n```js\nutils.code('const foo = bar;');\n//=\u003e '`const foo = bar;`'\n```\n\n### [.del](index.js#L50)\n\nCreate markdown-formatted deleted text: `~~text~~`.\n\n**Params**\n\n* `str` **{String}**\n\n**Example**\n\n```js\nutils.del('text');\n//=\u003e '~~text~~'\n```\n\n### [.em](index.js#L63)\n\nCreate a markdown-formatted em.\n\n**Params**\n\n* `str` **{String}**\n\n**Example**\n\n```js\nutils.em('This is emphasized');\n//=\u003e '_This is emphasized_'\n```\n\n### [.h](index.js#L77)\n\nCreate a markdown-formatted heading.\n\n**Params**\n\n* `str` **{String}**\n* `level` **{Number}**\n\n**Example**\n\n```js\nutils.h(1, 'This is a heading');\n//=\u003e '# This is a heading'\n```\n\n### [.h1](index.js#L90)\n\nCreate a markdown-formatted h1 heading.\n\n**Params**\n\n* `str` **{String}**\n\n**Example**\n\n```js\nutils.h1('This is a heading');\n//=\u003e '# This is a heading'\n```\n\n### [.h2](index.js#L103)\n\nCreate a markdown-formatted h2 heading.\n\n**Params**\n\n* `str` **{String}**\n\n**Example**\n\n```js\nutils.h2('This is a heading');\n//=\u003e '## This is a heading'\n```\n\n### [.h3](index.js#L116)\n\nCreate a markdown-formatted h3 heading.\n\n**Params**\n\n* `str` **{String}**\n\n**Example**\n\n```js\nutils.h3('This is a heading');\n//=\u003e '### This is a heading'\n```\n\n### [.h4](index.js#L129)\n\nCreate a markdown-formatted h4 heading.\n\n**Params**\n\n* `str` **{String}**\n\n**Example**\n\n```js\nutils.h4('This is a heading');\n//=\u003e '#### This is a heading'\n```\n\n### [.h5](index.js#L142)\n\nCreate a markdown-formatted h5 heading.\n\n**Params**\n\n* `str` **{String}**\n\n**Example**\n\n```js\nutils.h5('This is a heading');\n//=\u003e '##### This is a heading'\n```\n\n### [.h6](index.js#L155)\n\nCreate a markdown-formatted h6 heading.\n\n**Params**\n\n* `str` **{String}**\n\n**Example**\n\n```js\nutils.h6('This is a heading');\n//=\u003e '###### This is a heading'\n```\n\n### [.heading](index.js#L169)\n\nCreate a markdown-formatted heading.\n\n**Params**\n\n* `str` **{String}**\n* `level` **{Number}**\n\n**Example**\n\n```js\nutils.heading('This is a heading', 1);\n//=\u003e '# This is a heading'\n```\n\n### [.hr](index.js#L182)\n\nCreate a markdown-formatted horizontal rule.\n\n**Params**\n\n* `str` **{String}**: Alternate string to use. Default is `***` to avoid collision with `---` which is commonly used for front-matter.\n\n**Example**\n\n```js\nutils.hr();\n//=\u003e '***'\n```\n\n### [.link](index.js#L197)\n\nCreate a markdown-formatted link from the given values.\n\n**Params**\n\n* `anchor` **{String}**\n* `href` **{String}**\n* `title` **{String}**\n\n**Example**\n\n```js\nutils.link('fs-utils', 'https://github.com/assemble/fs-utils', 'hover title');\n//=\u003e [fs-utils](https://github.com/assemble/fs-utils \"hover title\")\n```\n\n### [.anchor](index.js#L214)\n\nCreate a markdown-formatted anchor link from the given values.\n\n**Params**\n\n* `anchor` **{String}**\n* `href` **{String}**\n* `title` **{String}**\n\n**Example**\n\n```js\nutils.anchor('embed', 'assemble/handlebars-helpers/lib/code.js', 25, 'v0.6.0');\n//=\u003e [embed](https://github.com/assemble/handlebars-helpers/blob/v0.6.0/lib/helpers/code.js#L25)\n```\n\n### [.reference](index.js#L245)\n\nCreate a markdown-formatted reference link from the given values.\n\n**Params**\n\n* `id` **{String}**\n* `url` **{String}**\n* `title` **{String}**\n\n**Example**\n\n```js\nutils.reference('template', 'https://github/jonschlinkert/template', 'Make stuff!');\n//=\u003e [template]: https://github/jonschlinkert/template \"Make stuff!\"\n```\n\n### [.image](index.js#L265)\n\nCreate a markdown-formatted image from the given values.\n\n**Params**\n\n* `alt` **{String}**\n* `src` **{String}**\n* `title` **{String}**\n\n**Example**\n\n```js\nutils.image(alt, src);\n//=\u003e ![Build Status](https://travis-ci.org/jonschlinkert/template.svg)\n\nutils.image(alt, src, title);\n//=\u003e ![Build Status](https://travis-ci.org/jonschlinkert/template.svg \"This is title of image!\")\n```\n\n### [.badge](index.js#L280)\n\nCreate a markdown-formatted badge.\n\n**Params**\n\n* `alt` **{String}**\n* `img_url` **{String}**\n* `url` **{String}**\n\n**Example**\n\n```js\nutils.badge(alt, img_url, url);\n//=\u003e [![Build Status](https://travis-ci.org/jonschlinkert/template.svg)](https://travis-ci.org/jonschlinkert/template)\n```\n\n### [.li](index.js#L308)\n\nReturns a function to generate a plain-text/markdown list-item, allowing options to be cached for subsequent calls.\n\n**Params**\n\n* `options` **{String}**  \n\n- `nobullet` **{Boolean}**: Pass true if you only want the list iten and identation, but no bullets.\n- `indent` **{String}**: The amount of leading indentation to use. default is ``.\n- `chars` **{String|Array}**: If a string is passed, [fill-range](https://github.com/jonschlinkert/fill-range) will be used to generate an array of bullets (visit [fill-range](https://github.com/jonschlinkert/fill-range) to see all options.) Or directly pass an array of bullets, numbers, letters or other characters to use for each list item. Default `['-', '*', '+', '~']`\n* `fn` **{Function}**: pass a function [fill-range](https://github.com/jonschlinkert/fill-range) to modify the bullet for an item as it's generated.\n\n**Example**\n\n```js\nconst li = listitem(options);\n\nli(0, 'Level 0 list item');\n//=\u003e '- Level 0 list item'\n\nli(1, 'Level 1 list item');\n//=\u003e '  * Level 1 list item'\n\nli(2, 'Level 2 list item');\n//=\u003e '    + Level 2 list item'\n```\n\n### [.pre](index.js#L328)\n\nCreate a markdown-formatted `\u003cpre\u003e\u003ccode\u003e\u003c/code\u003e\u003c/pre\u003e` snippet with or without lang.\n\nResults in:\n\n**Params**\n\n* `str` **{String}**\n* `language` **{String}**\n\n**Examples**\n\n```js\nutils.pre('const foo = bar;');\n```\n\n```html\n\u003cpre\u003e\nconst foo = bar;\n\u003c/pre\u003e\n```\n\n### [.gfm](index.js#L349)\n\nCreate a markdown-formatted code snippet with or without `lang`.\n\nResults in:\n\u003cpre\u003e\n\u003c/pre\u003e\n\n**Params**\n\n* `str` **{String}**\n* `language` **{String}**\n\n**Examples**\n\n```js\nutils.gfm('const foo = bar;', 'js');\n```\n\n```js\nconst foo = bar;\n```\n\n### [.strong](index.js#L365)\n\nCreate markdown-formatted bold text.\n\n**Params**\n\n* `str` **{String}**\n\n**Example**\n\n```js\nutils.strong('This is bold');\n//=\u003e '**This is bold**'\n```\n\n### [.todo](index.js#L381)\n\nCreate a markdown-formatted todo item.\n\n**Params**\n\n* `str` **{String}**\n\n**Example**\n\n```js\nutils.todo('this is a todo.');\n//=\u003e '- [ ] this is a todo'\n\nutils.todo('this is a completed todo.', true);\n//=\u003e '- [x] this is a todo'\n```\n\n## About\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n\u003c/details\u003e\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [gfm-code-blocks](https://www.npmjs.com/package/gfm-code-blocks): Extract gfm (GitHub Flavored Markdown) fenced code blocks from a string. | [homepage](https://github.com/jonschlinkert/gfm-code-blocks \"Extract gfm (GitHub Flavored Markdown) fenced code blocks from a string.\")\n* [markdown-link](https://www.npmjs.com/package/markdown-link): Micro util for generating a single markdown link. | [homepage](https://github.com/jonschlinkert/markdown-link \"Micro util for generating a single markdown link.\")\n* [markdown-toc](https://www.npmjs.com/package/markdown-toc): Generate a markdown TOC (table of contents) with Remarkable. | [homepage](https://github.com/jonschlinkert/markdown-toc \"Generate a markdown TOC (table of contents) with Remarkable.\")\n* [remarkable](https://www.npmjs.com/package/remarkable): Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in… [more](https://github.com/jonschlinkert/remarkable) | [homepage](https://github.com/jonschlinkert/remarkable \"Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in one.\")\n\n### Contributors\n\n| **Commits** | **Contributor** | \n| --- | --- |\n| 49 | [jonschlinkert](https://github.com/jonschlinkert) |\n| 12 | [adjohnson916](https://github.com/adjohnson916) |\n\n### Author\n\n**Jon Schlinkert**\n\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 05, 2018._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fmarkdown-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Fmarkdown-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fmarkdown-utils/lists"}