{"_id":"helper-toc","_rev":"5-7be7e15cf7ba4334c5d0e8ba6c3ba00c","name":"helper-toc","description":"Template helper for generating a table of contents using content from the file in which the helper is used, or for a glob of files.","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"helper-toc","description":"Template helper for generating a table of contents. The TOC can be from content in the current file or for a glob of files.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/helper-toc","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/helper-toc.git"},"bugs":{"url":"https://github.com/jonschlinkert/helper-toc/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/helper-toc/blob/master/LICENSE"},"files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"globby":"^2.0.0","lodash":"^3.7.0","markdown-toc":"^0.11.2","markdown-utils":"^0.6.0","mixin-deep":"^1.0.1","relative":"^3.0.0"},"devDependencies":{"handlebars":"^3.0.2","mocha":"*","should":"*","template":"^0.13.1"},"keywords":["contents","helper","markdown","md","table","table-of-contents","template","toc"],"_id":"helper-toc@0.1.0","_shasum":"16c9423b096ad70bb3237b7c96ea36a641986cfe","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"16c9423b096ad70bb3237b7c96ea36a641986cfe","tarball":"https://registry.npmjs.org/helper-toc/-/helper-toc-0.1.0.tgz","integrity":"sha512-+fxnMKOiBKpdj0HQITHryP9Kkh+J7tGemZ2qKkOtBFmpIZHzdKCnJD2UyAs7YdeKh0eWNAo6FnNvLjxSafkSJw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3ZUBF1Tr3IC1A8NprIKOKMBIIPANiXo2YG/Wk8nEKBwIgcxWL6hnhDDDukShVXfIOeZFOt2DSQ+3WpU/hGn7SLJ0="}]}},"0.1.2":{"name":"helper-toc","description":"Template helper for generating a table of contents using content from the file in which the helper is used, or for a glob of files.","version":"0.1.2","homepage":"https://github.com/jonschlinkert/helper-toc","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/helper-toc.git"},"bugs":{"url":"https://github.com/jonschlinkert/helper-toc/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/helper-toc/blob/master/LICENSE"},"files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"globby":"^2.0.0","markdown-toc":"^0.11.3","markdown-utils":"^0.6.1","mixin-deep":"^1.1.0","relative":"^3.0.0"},"devDependencies":{"mocha":"*","should":"*","template":"^0.13.1"},"keywords":["contents","helper","markdown","md","table","table-of-contents","template","toc"],"gitHead":"50ed1b841389be398b8f3f35bf4026a82495cc1b","_id":"helper-toc@0.1.2","_shasum":"8400b2f331cf6b3eb4e7ae1b8d5fe670815fc125","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"8400b2f331cf6b3eb4e7ae1b8d5fe670815fc125","tarball":"https://registry.npmjs.org/helper-toc/-/helper-toc-0.1.2.tgz","integrity":"sha512-zTM29V/fWfH+FvuVfZIATukUSIsf4l/3jlDz8UlRTlpWUnDMQ1CGGfvIi0KFGi3VfzO4e5xRaX6bNpK4+ZipuA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8oTSZDYuxR3UAG/R9n3XJOxRU+DOYB8f7aMnkjJA1KQIgaWaJTryR1DJFmgs0CrQx7b25idxqvKyPKDCb+XFHifg="}]}},"0.2.0":{"name":"helper-toc","description":"Template helper for generating a table of contents using content from the file in which the helper is used, or for a glob of files.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/helper-toc","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/helper-toc.git"},"bugs":{"url":"https://github.com/jonschlinkert/helper-toc/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/helper-toc/blob/master/LICENSE"},"files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"glob-toc":"^0.1.2","globby":"^2.0.0","markdown-toc":"^0.11.3","markdown-utils":"^0.6.1","mixin-deep":"^1.1.0","relative":"^3.0.0"},"devDependencies":{"lodash":"^3.8.0","mocha":"*","should":"*","template":"^0.13.1"},"keywords":["contents","helper","markdown","md","table","table-of-contents","template","toc"],"gitHead":"e43b4d6887ffd50dcbe67b06a79161d80c303582","_id":"helper-toc@0.2.0","_shasum":"3469e5ec45515df79629a196744b8480c0f11798","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"3469e5ec45515df79629a196744b8480c0f11798","tarball":"https://registry.npmjs.org/helper-toc/-/helper-toc-0.2.0.tgz","integrity":"sha512-s0eeYksuipd2I7vyu854HHPY4DksmtyXdsR7IFuTmuS+dHGW8f3jpCo/41DFW9o2lR0bhQNEPKj5my+9PJ/J9w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnt8QVi1T8M1UxvIGI8+VDz+PLGD9ZX+qaz8rX42eusAIhAMI/OgjpZq6TzUnfP/6ls9lf9mnJUw2pJrmym6i0fPm5"}]}}},"readme":"# helper-toc [![NPM version](https://badge.fury.io/js/helper-toc.svg)](http://badge.fury.io/js/helper-toc)\n\n> Template helper for generating a table of contents using content from the file in which the helper is used, or for a glob of files.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/)\n\n```bash\nnpm i helper-toc --save\n```\n\nSee the [tests](./tests/test.js) for actual usage and options examples.\n\n# Table of contents\n\n<!-- toc -->\n\n* [Usage](#usage)\n* [Register](#register)\n* [Related projects](#related-projects)\n* [Running tests](#running-tests)\n* [Contributing](#contributing)\n* [Author](#author)\n* [License](#license)\n\n_(Table of contents generated by [verb])_\n\n<!-- tocstop -->\n\n## Usage\n\n```js\nvar toc = require('helper-toc');\n```\n\nExample using Lo-Dash templates:\n\n```js\n<%= toc(\"*.md\") %>\n```\n\nRender:\n\n```js\n// pass a string, and pass the helper on the context\nvar result = _.template(str)({toc: helper()});\n```\n\nResults in a table of contents that looks something like:\n\n```markdown\n* [one.md](./one.md)\n* [two.md](./two.md)\n* [three.md](./one.md)\n```\n\n## Register\n\n**Register with [template]**\n\n```js\nvar Template = require('template');\nvar template = new Template();\ntemplate.helper('toc', require('helper-toc'));\n```\n\n**Register with [verb]**\n\n```js\nvar verb = require('verb');\nverb.helper('toc', require('helper-toc'));\n```\n\n**Register with [assemble]**\n\n```js\nvar assemble = require('assemble');\nassemble.helper('toc', require('helper-toc'));\n```\n\n## Related projects\n\n* [glob-toc](https://github.com/jonschlinkert/glob-toc): Create a table of contents from a glob of files.\n* [markdown-toc](https://github.com/jonschlinkert/markdown-toc): Generate a markdown TOC (table of contents) with Remarkable.\n* [pretty-remarkable](https://github.com/jonschlinkert/pretty-remarkable): Plugin for prettifying markdown with Remarkable using custom renderer rules.\n* [remarkable](https://github.com/jonschlinkert/remarkable): Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in… [more](https://github.com/jonschlinkert/remarkable)\n\n## Running tests\n\nInstall dev dependencies:\n\n```bash\nnpm i -d && npm test\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/helper-toc/issues/new)\n\n## Author\n\n**Jon Schlinkert**\n\n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright (c) 2015 Jon Schlinkert\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 10, 2015._","maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2022-06-18T20:08:27.686Z","created":"2015-05-02T04:10:39.323Z","0.1.0":"2015-05-02T04:10:39.323Z","0.1.2":"2015-05-02T04:38:52.334Z","0.2.0":"2015-05-10T14:53:41.863Z"},"homepage":"https://github.com/jonschlinkert/helper-toc","keywords":["contents","helper","markdown","md","table","table-of-contents","template","toc"],"repository":{"type":"git","url":"git://github.com/jonschlinkert/helper-toc.git"},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"bugs":{"url":"https://github.com/jonschlinkert/helper-toc/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/helper-toc/blob/master/LICENSE"},"readmeFilename":"README.md"}