Socket
Socket
Sign inDemoInstall

markdown-utils

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-utils - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

38

index.js

@@ -332,41 +332,3 @@ /*!

/**
* Pass an array of list-item objects to generate a formatted list
* or table of contents. Uses [list-item] for generating the actual
* items.
*
*
* ```js
* var list = [
* {text: 'This is item 1', lvl: 0},
* {text: 'This is item 2', lvl: 0},
* {text: 'This is item 3', lvl: 0},
* {text: 'This is sub-item A', lvl: 2},
* {text: 'This is sub-item B', lvl: 2},
* {text: 'This is sub-item C', lvl: 2},
* ];
* list([{text: 'This is a list item', lvl: 0}]);
*
* // Results in
* // '- This is item 1'
* // '- This is item 2'
* // '- This is item 3'
* // ' * This is sub-item A'
* // ' * This is sub-item B'
* // ' * This is sub-item C'
* ```
*
* @name .list
* @param {Array} `list` Array of item objects with `text` and `lvl` properties
* @property {String} `text` [list] The text for the list item.
* @property {Number} `lvl` [list] The level of the list item to be used for indenting the list.
* @param {Object} `opts` Options to pass to [list-item].
* @param {Function} `fn` pass a function [expand-range] to modify the bullet for an item as it's generated.
* @api public
*/
exports.list = require('bullets');
/**
* Returns a function to generate a plain-text/markdown list-item,

@@ -373,0 +335,0 @@ * allowing options to be cached for subsequent calls.

3

package.json
{
"name": "markdown-utils",
"description": "Micro-utils for creating markdown snippets.",
"version": "0.5.0",
"version": "0.6.0",
"homepage": "https://github.com/jonschlinkert/markdown-utils",

@@ -34,3 +34,2 @@ "author": {

"array-slice": "^0.2.2",
"bullets": "^0.1.1",
"is-number": "^1.1.0",

@@ -37,0 +36,0 @@ "list-item": "^0.1.2"

@@ -5,2 +5,4 @@ # markdown-utils [![NPM version](https://badge.fury.io/js/markdown-utils.svg)](http://badge.fury.io/js/markdown-utils) [![Build Status](https://travis-ci.org/jonschlinkert/markdown-utils.svg)](https://travis-ci.org/jonschlinkert/markdown-utils)

**Heads up!** `.list()` was removed in 0.6.0. If you still need this functionality use [bullets] instead.
## Install with [npm](npmjs.org)

@@ -233,32 +235,4 @@

### [.list](./index.js#L368)
### [.li](./index.js#L358)
Pass an array of list-item objects to generate a formatted list or table of contents. Uses [list-item] for generating the actual items.
* `list` **{Array}**: Array of item objects with `text` and `lvl` properties
* `opts` **{Object}**: Options to pass to [list-item].
* `fn` **{Function}**: pass a function [expand-range] to modify the bullet for an item as it's generated.
```js
var list = [
{text: 'This is item 1', lvl: 0},
{text: 'This is item 2', lvl: 0},
{text: 'This is item 3', lvl: 0},
{text: 'This is sub-item A', lvl: 2},
{text: 'This is sub-item B', lvl: 2},
{text: 'This is sub-item C', lvl: 2},
];
list([{text: 'This is a list item', lvl: 0}]);
// Results in
// '- This is item 1'
// '- This is item 2'
// '- This is item 3'
// ' * This is sub-item A'
// ' * This is sub-item B'
// ' * This is sub-item C'
```
### [.li](./index.js#L396)
Returns a function to generate a plain-text/markdown list-item, allowing options to be cached for subsequent calls.

@@ -286,3 +260,3 @@

### [.pre](./index.js#L420)
### [.pre](./index.js#L382)

@@ -307,3 +281,3 @@ Create a markdown-formatted `<pre><code></code></pre>` snippet with or without lang.

### [.reference](./index.js#L444)
### [.reference](./index.js#L406)

@@ -321,3 +295,3 @@ Create a markdown-formatted reference link from the given values.

### [.strong](./index.js#L462)
### [.strong](./index.js#L424)

@@ -333,3 +307,3 @@ Create markdown-formatted bold text.

### [.todo](./index.js#L482)
### [.todo](./index.js#L444)

@@ -348,6 +322,7 @@ Create a markdown-formatted todo item.

## Related
* [remarkable](https://github.com/jonschlinkert/remarkable): Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in one.
* [markdown-toc](https://github.com/jonschlinkert/markdown-toc): Generate a markdown TOC (table of contents) with Remarkable.
* [markdown-link](https://github.com/jonschlinkert/markdown-link): Micro util for generating a single markdown link.
* [gfm-code-blocks](https://github.com/jonschlinkert/gfm-code-blocks): Extract gfm (GitHub Flavored Markdown) fenced code blocks from a string.

@@ -377,2 +352,4 @@ ## Running tests

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 13, 2015._
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 18, 2015._
[bullets]: https://github.com/jonschlinkert/bullets
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc