Socket
Socket
Sign inDemoInstall

markdown-toc

Package Overview
Dependencies
38
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.11.3 to 0.11.4

cli.js

27

package.json
{
"name": "markdown-toc",
"description": "Generate a markdown TOC (table of contents) with Remarkable.",
"version": "0.11.3",
"version": "0.11.4",
"homepage": "https://github.com/jonschlinkert/markdown-toc",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"bin": {
"markdown-toc": "cli.js"
},

@@ -17,7 +17,5 @@ "repository": {

},
"license": {
"type": "MIT",
"url": "https://github.com/jonschlinkert/markdown-toc/blob/master/LICENSE"
},
"license": "MIT",
"files": [
"cli.js",
"index.js",

@@ -34,8 +32,10 @@ "lib/"

"dependencies": {
"concat-stream": "^1.4.8",
"extend-shallow": "^1.1.2",
"gray-matter": "^1.3.0",
"markdown-link": "^0.1.0",
"gray-matter": "^2.0.0",
"markdown-link": "^0.1.1",
"minimist": "^1.1.1",
"object.pick": "^1.1.1",
"remarkable": "^1.6.0",
"repeat-string": "^1.5.0"
"repeat-string": "^1.5.2"
},

@@ -67,3 +67,6 @@ "devDependencies": {

"write"
]
],
"directories": {
"test": "test"
}
}

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

* Won't mangle markdown in code examples (like headings in gfm fenced code blocks that other TOC generators mistake as being real headings)
* Won't mangle markdown in code examples (like headings, coffee or yaml comments in gfm fenced code blocks that other TOC generators mistake as being actual headings)
* Uses sane defaults, so no customization is necessary, but you can if you need to.

@@ -12,6 +12,8 @@ * Get JSON to generate your own TOC from whatever templates you want to use

## Install with [npm](npmjs.org)
## Install
```bash
npm i markdown-toc --save
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i markdown-toc --save
```

@@ -153,11 +155,8 @@

```js
function removeYunk(str, ele, arr) {
function removeJunk(str, ele, arr) {
return str.indexOf('...') === -1;
}
var result = toc(str, {filter: removeYunk});
//=> beautiful TOC, sans "Yunk"? wtf is "Yunk"
// anyway? Look, j and y are kind of sort of
// close on the keyboard. Regardless, it gets the
// yunk out of your headings.
var result = toc(str, {filter: removeJunk});
//=> beautiful TOC
```

@@ -193,4 +192,4 @@

```bash
npm i -d && npm test
```sh
$ npm i -d && npm test
```

@@ -200,3 +199,3 @@

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/markdown-toc/issues)
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/markdown-toc/issues/new)

@@ -212,3 +211,3 @@ ## Author

Copyright (c) 2014-2015 Jon Schlinkert
Copyright © 2014-2015 Jon Schlinkert
Released under the MIT license.

@@ -218,8 +217,2 @@

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on April 27, 2015._
<!-- reflinks generated by verb-reflinks plugin -->
[assemble]: http://assemble.io
[template]: https://github.com/jonschlinkert/template
[verb]: https://github.com/assemble/verb
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 21, 2015._
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc