Socket
Book a DemoInstallSign in
Socket

markdown-list

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-list

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

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

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
  • 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.

Keywords

list

FAQs

Package last updated on 14 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts