{"author":{"name":"Gajus Kuizinas","email":"gajus@gajus.com","url":"http://gajus.com"},"dependencies":{"contents":"^5.0.0","lodash":"^4.17.10"},"description":"Generate table of contents for a markdown document.","devDependencies":{"chai":"^4.1.2","mocha":"^5.2.0"},"keywords":["table of contents","contents","toc","markdown"],"license":"BSD-3-Clause","main":"./src/markdown-contents.js","name":"markdown-contents","repository":{"type":"git","url":"git+https://github.com/gajus/markdown-contents.git"},"scripts":{"test":"mocha"},"version":"1.0.11","gitHead":"1ab97b5c721fd9be30f6ce11dc6f55aa5f571022","bugs":{"url":"https://github.com/gajus/markdown-contents/issues"},"homepage":"https://github.com/gajus/markdown-contents#readme","_id":"markdown-contents@1.0.11","_npmVersion":"6.4.0","_nodeVersion":"10.7.0","_npmUser":{"name":"gajus","email":"gajus@gajus.com"},"dist":{"integrity":"sha512-6o8It0JhmoN398ATp8zOWHAniTB3/tEXUVTCP00gTqwZNc465DIoHTTaspyEkaov93QLhrqirxizJ29E/i8/0Q==","shasum":"e184d5143a2a4d86da3eac3d27ae8a194ca8f2eb","tarball":"http://registry-npm.ywwl.com/markdown-contents/download/markdown-contents-1.0.11.tgz","fileCount":6,"unpackedSize":10092,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiAbhCRA9TVsSAnZWagAATasP+wXNnFPMQZ1ucq+MmzRL\ne/k1ZewZTWHKenIotg+6KXV/S8MK5cTDubDhsuGa/udTSFmQ5frc4B+ytBj8\n2tyRMm/Sek7f3FHUgHXZ3m6ki1mUT9RzZtuvOX6XApFIRlYfww+VfbplVnGu\nB03LRydEVh1qMBXV5+48ag5YjMueCZ6ZvGg4fk5suWJi6m2x0JGgFVXFfGln\nyJyyTD9SNqx5koijwGIjlgjbxNZNGQZP8BND5nMji2fZqC9aACk2wVhaQH+F\n2cbiFDu74K7ZSt94YZjwGkTHqgRRuHO4nr3OyIh64DXvIwnri0s70E1poQ8q\nVUhDC0IRLt7A2aDTiS/hjwt9e2fOOuRP9SvLNkLFcrafhamk/F9CNKRPKgsX\nTPLEvpJ7vts6rb+9QgVs5A4ZEaLd1PDYnXyybs3Sr83VoNm9lgXZw4tpeoir\n2BpNVeAhf3JvansQyaDNuTck9WAIuTOtv+EdQxOizI6v79NiRAUT/gmUQFzl\nVQbGGKLD34Jw2RvSuv5h6MQNmv3t/UiB+DfsGB8BVBoOXdLBgYjftMnrXw9J\nCLObjMv08XxZDAQ4wrH9M+a6I45l1tiheDAYLr8bK2wxfBGr8uhWVDKLjAnD\n6dh5CHLv34qOs6c75FHhTvTGxLCXdSZkN5y/PS8+MMKMuGMYrW+Is8kV9W8K\nYWYl\r\n=X65G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBv1HPtv16nbYXCbLoO2DvyVUvSSF8tcjZwKg4YjbgcqAiBSkeRRs39Zwq59vWqW+Kp1cmQQE9lCGVEQ9gZowutJug=="}],"size":3164,"noattachment":false,"key":"/markdown-contents/-/markdown-contents-1.0.11.tgz"},"maintainers":[{"email":"gajus@gajus.com","name":"gajus"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-contents_1.0.11_1535641312460_0.5873814476306913"},"_hasShrinkwrap":false,"readme":"## Markdown Contents\n\n[![Travis build status](http://img.shields.io/travis/gajus/markdown-contents/master.svg?style=flat-square)](https://travis-ci.org/gajus/markdown-contents)\n[![Coveralls](https://img.shields.io/coveralls/gajus/markdown-contents.svg?style=flat-square)](https://coveralls.io/github/gajus/markdown-contents)\n[![NPM version](http://img.shields.io/npm/v/markdown-contents.svg?style=flat-square)](https://www.npmjs.org/package/markdown-contents)\n[![Canonical Code Style](https://img.shields.io/badge/code%20style-canonical-blue.svg?style=flat-square)](https://github.com/gajus/canonical)\n[![Twitter Follow](https://img.shields.io/twitter/follow/kuizinas.svg?style=social&label=Follow)](https://twitter.com/kuizinas)\n\nGenerate table of contents for a markdown document.\n\nThe underlying implementation is rendering markdown file into HTML and then use [Contents](https://github.com/gajus/contents).\n to generate the table of contents.\n\n## Usage\n\n```js\nimport MarkdownContents from 'markdown-contents';\n\nconst markdown = '';\nconst markdownContents = MarkdownContents(markdown);\n\n/**\n * Generate flat index of the headings.\n *\n * @return {Array}\n */\nmarkdownContents.articles();\n\n/**\n * Generates hierarchical index of the headings from a flat index.\n *\n * @return {Array}\n */\nmarkdownContents.tree();\n\n/**\n * Generate markdown for the table of contents.\n *\n * @return {string}\n */\nmarkdownContents.markdown();\n\n/**\n * Generate markdown contents for an array of contents object definition.\n *\n * @param {Array} tree [{id: '', name: '', descendants: []}]\n * @return {string} markdown\n */\nMarkdownContents.treeToMarkdown();\n\n/**\n * Makes hierarchical index of the articles from a flat index.\n *\n * @param {Array} articles Generated using Contents.articles.\n * @param {boolean} makeUniqueIDs\n * @param {Array} uniqueIDpool\n * @return {Array}\n */\nMarkdownContents.tree();\n\n```\n","publish_time":1535641312615,"_cnpm_publish_time":1535641312615,"dist-tags":{"latest":"1.0.11"}}