{"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":"http://registry-npm.ywwl.com/helper-toc/download/helper-toc-0.1.2.tgz","integrity":"sha512-zTM29V/fWfH+FvuVfZIATukUSIsf4l/3jlDz8UlRTlpWUnDMQ1CGGfvIi0KFGi3VfzO4e5xRaX6bNpK4+ZipuA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8oTSZDYuxR3UAG/R9n3XJOxRU+DOYB8f7aMnkjJA1KQIgaWaJTryR1DJFmgs0CrQx7b25idxqvKyPKDCb+XFHifg="}],"size":2967,"noattachment":false,"key":"/helper-toc/-/helper-toc-0.1.2.tgz"},"directories":{},"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._","publish_time":1430541532334,"_cnpm_publish_time":1430541532334,"dist-tags":{"latest":"0.2.0"}}