{"_id":"helper-toc","_rev":"95728","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"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:31:56.000Z","created":"2015-05-02T04:10:39.323Z","0.2.0":"2015-05-10T14:53:41.863Z","0.1.2":"2015-05-02T04:38:52.334Z","0.1.0":"2015-05-02T04:10:39.323Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/helper-toc.git"},"versions":{"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","size":3352,"noattachment":false,"key":"/helper-toc/-/helper-toc-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/helper-toc/download/helper-toc-0.2.0.tgz"},"directories":{},"publish_time":1431269621863,"_cnpm_publish_time":1431269621863,"_hasShrinkwrap":false},"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","size":2967,"noattachment":false,"key":"/helper-toc/-/helper-toc-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/helper-toc/download/helper-toc-0.1.2.tgz"},"directories":{},"publish_time":1430541532334,"_cnpm_publish_time":1430541532334,"_hasShrinkwrap":false},"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","size":2837,"noattachment":false,"key":"/helper-toc/-/helper-toc-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/helper-toc/download/helper-toc-0.1.0.tgz"},"directories":{},"publish_time":1430539839323,"_cnpm_publish_time":1430539839323,"_hasShrinkwrap":false}},"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._","_attachments":{},"homepage":"https://github.com/jonschlinkert/helper-toc","bugs":{"url":"https://github.com/jonschlinkert/helper-toc/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/helper-toc/blob/master/LICENSE"}}