{"name":"markdown-utils","description":"Micro-utils for creating markdown snippets.","version":"0.6.1","homepage":"https://github.com/jonschlinkert/markdown-utils","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/markdown-utils.git"},"bugs":{"url":"https://github.com/jonschlinkert/markdown-utils/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/markdown-utils/blob/master/LICENSE"},"files":["index.js","lib/"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"array-slice":"^0.2.2","is-number":"^1.1.0","list-item":"^0.1.2"},"devDependencies":{"for-own":"^0.1.2","should":"^5.0.1"},"keywords":["blog","commonmark","markdown","md","post","remarkable","render","renderer","util","write"],"gitHead":"b51603ace90a04ce752060ca9c57ef8f2889a86c","_id":"markdown-utils@0.6.1","_shasum":"0a09e896a3987313518196362f45a5dfc30a68c4","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"0a09e896a3987313518196362f45a5dfc30a68c4","tarball":"http://registry-npm.ywwl.com/markdown-utils/download/markdown-utils-0.6.1.tgz","integrity":"sha512-9j0rjH9D61Ntg1VgctwUD6xRQ6XEiiI2xZ9wodyVnlDskhAxzbIX5gJ7wmbfr1EHPQWqV8uxko/hI7I60igABw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvFITohofxJV1/77F0WlyH+VGWfIzbX91UhkkvB3xVnAIgfZXYHzAf5d8rj/NjKNTylZdKp4bTG5gsPkYyebAIRAY="}],"size":4902,"noattachment":false,"key":"/markdown-utils/-/markdown-utils-0.6.1.tgz"},"directories":{},"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&label=Travis)](https://travis-ci.org/jonschlinkert/markdown-utils)\n\n> 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//=> '> This is a blockquote'\n```\n\n### [.code](index.js#L37)\n\nCreate a markdown-formatted `<code></code>` snippet.\n\n**Params**\n\n* `str` **{String}**\n\n**Example**\n\n```js\nutils.code('const foo = bar;');\n//=> '`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//=> '~~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//=> '_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//=> '# 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//=> '# 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//=> '## 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//=> '### 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//=> '#### 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//=> '##### 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//=> '###### 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//=> '# 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//=> '***'\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//=> [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//=> [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//=> [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//=> ![Build Status](https://travis-ci.org/jonschlinkert/template.svg)\n\nutils.image(alt, src, title);\n//=> ![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//=> [![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//=> '- Level 0 list item'\n\nli(1, 'Level 1 list item');\n//=> '  * Level 1 list item'\n\nli(2, 'Level 2 list item');\n//=> '    + Level 2 list item'\n```\n\n### [.pre](index.js#L328)\n\nCreate a markdown-formatted `<pre><code></code></pre>` 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<pre>\nconst foo = bar;\n</pre>\n```\n\n### [.gfm](index.js#L349)\n\nCreate a markdown-formatted code snippet with or without `lang`.\n\nResults in:\n<pre>\n</pre>\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//=> '**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//=> '- [ ] this is a todo'\n\nutils.todo('this is a completed todo.', true);\n//=> '- [x] this is a todo'\n```\n\n## About\n\n<details>\n<summary><strong>Contributing</strong></summary>\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n</details>\n\n<details>\n<summary><strong>Running Tests</strong></summary>\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 && npm test\n```\n\n</details>\n\n<details>\n<summary><strong>Building docs</strong></summary>\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 && verb\n```\n\n</details>\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._","publish_time":1430329331545,"_cnpm_publish_time":1430329331545,"dist-tags":{"latest":"1.0.0"}}