markdown-list

0.1.0 • Public • Published

markdown-list NPM version Build Status

Render a markdown-formatted bullet list from an array or object.

(TOC generated by verb using markdown-toc)

Install

Install with npm:

$ npm i markdown-list --save

Usage

var list = require('markdown-list');

Reformats a string list, or converts an array to a string list.

Examples

All of the following:

list('foo\nbar\nbaz');
list('*foo\n*bar\n*baz');
list(['foo', 'bar', 'baz']);

Result in:

- foo
- bar
- baz

Fixes bullets

list('*foo\n- bar');

Results in:

- foo
- bar

Detects and fixes bullet levels

list('*foo\n - bar\n *baz');

Results in:

- foo
  * bar
  * baz

Related projects

  • bullets: Generate a plain-text and markdown formatted lists or tables of contents, with proper indentation, bullets,… more | homepage
  • deromanize: Convert roman numerals to arabic numbers (useful for books, outlines, documentation, slide decks, etc) | homepage
  • list-item: Generate a single formatted list item, allowing you to easily generate lists with proper indentation,… more | homepage
  • romanize: Convert numbers to roman numerals (useful for books, outlines, documentation, slide decks, etc) | homepage
  • to-list: Parse a string into a list object with text and level properties. | homepage

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2016 Jon Schlinkert Released under the MIT license.


This file was generated by verb on January 19, 2016.

Readme

Keywords

Package Sidebar

Install

npm i markdown-list

Weekly Downloads

17

Version

0.1.0

License

MIT

Last publish

Collaborators

  • jonschlinkert