Render a markdown-formatted bullet list from an array or object.
(TOC generated by verb using markdown-toc)
Install with npm:
$ npm i markdown-list --save
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
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Jon Schlinkert
Copyright © 2016 Jon Schlinkert Released under the MIT license.
This file was generated by verb on January 19, 2016.