{"name":"esprima-extract-comments","description":"Extract code comments from string or from a glob of files using esprima.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/esprima-extract-comments","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/esprima-extract-comments.git"},"bugs":{"url":"https://github.com/jonschlinkert/esprima-extract-comments/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/esprima-extract-comments/blob/master/LICENSE-MIT"}],"keywords":["code","parse","javascript","block","context","comments","comment","extract","esprima","glob"],"main":"index.js","engines":{"node":">=0.8"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"mocha":"~1.18.2","should":"^4.0.4","verb":"^0.2.15","verb-tag-jscomments":"^0.2.2"},"dependencies":{"esprima":"git+https://git@github.com/ariya/esprima","map-files":"^0.1.1","mixin-deep":"^0.1.0"},"_id":"esprima-extract-comments@0.1.0","_shasum":"bbef6ab5563bd14c5d539a3873c298655406ac0e","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"bbef6ab5563bd14c5d539a3873c298655406ac0e","tarball":"http://registry-npm.ywwl.com/esprima-extract-comments/download/esprima-extract-comments-0.1.0.tgz","integrity":"sha512-YudcClz2EXOwrBvDInZXvYglUzRwqYySsmyXBfOZIiL+1BGa4mMbrW5lzx3hOyy92fwcUuPVOPqihZAbCRM1Dg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvQy4n4xQGCdCdcsNBNdYlWlokz+bWX35TOrla5MqsxQIhAJqnwwsdNdf8F7vFWz/ICt+zd+jZsNbs6mttd3W/PRoN"}],"size":11458,"noattachment":false,"key":"/esprima-extract-comments/-/esprima-extract-comments-0.1.0.tgz"},"directories":{},"readme":"# esprima-extract-comments [![NPM version](https://img.shields.io/npm/v/esprima-extract-comments.svg?style=flat)](https://www.npmjs.com/package/esprima-extract-comments) [![NPM monthly downloads](https://img.shields.io/npm/dm/esprima-extract-comments.svg?style=flat)](https://npmjs.org/package/esprima-extract-comments) [![NPM total downloads](https://img.shields.io/npm/dt/esprima-extract-comments.svg?style=flat)](https://npmjs.org/package/esprima-extract-comments) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/esprima-extract-comments.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/esprima-extract-comments)\n\n> Extract code comments from string or from a glob of files using esprima.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save esprima-extract-comments\n```\n\n## Breaking changes in v1.0.0!\n\n* line `comment.type` was changed from `line` to `LineComment`\n* block `comment.type` was changed from `block` to `BlockComment`\n\n## Usage\n\nAdd to your Node.js/JavaScript project with the following line of code:\n\n```js\nconst extract = require('esprima-extract-comments');\n```\n\n## API\n\n### [extract](index.js#L30)\n\nExtract line and block comments from a string of JavaScript.\n\n**Params**\n\n* `string` **{String}**\n* `options` **{Object}**: Options to pass to [esprima](http://esprima.org).\n* `returns` **{Array}**: Array of code comment objects.\n\n**Example**\n\n```js\nconsole.log(extract('// this is a line comment'));\n// [ { type: 'Line',\n//     value: ' this is a line comment',\n//     range: [ 0, 25 ],\n//     loc: { start: { line: 1, column: 0 }, end: { line: 1, column: 25 } } } ]\n```\n\n### [.file](index.js#L52)\n\nExtract code comments from a JavaScript file.\n\n**Params**\n\n* `file` **{String}**: Filepath to the file to parse.\n* `options` **{Object}**: Options to pass to [esprima](http://esprima.org).\n* `returns` **{Array}**: Array of code comment objects.\n\n**Example**\n\n```js\nconsole.log(extract.file('some-file.js'), { cwd: 'some/path' });\n// [ { type: 'Line',\n//     value: ' this is a line comment',\n//     range: [ 0, 25 ],\n//     loc: { start: { line: 1, column: 0 }, end: { line: 1, column: 25 } } } ]\n```\n\n## About\n\n<details>\n<summary><strong>Contributing</strong></summary>\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n</details>\n\n<details>\n<summary><strong>Running Tests</strong></summary>\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n</details>\n\n<details>\n<summary><strong>Building docs</strong></summary>\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n</details>\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [extract-comments](https://www.npmjs.com/package/extract-comments): Uses esprima to extract line and block comments from a string of JavaScript. Also optionally… [more](https://github.com/jonschlinkert/extract-comments) | [homepage](https://github.com/jonschlinkert/extract-comments \"Uses esprima to extract line and block comments from a string of JavaScript. Also optionally parses code context (the next line of code after a comment).\")\n* [js-comments](https://www.npmjs.com/package/js-comments): Parse JavaScript code comments and generate API documentation. | [homepage](https://github.com/jonschlinkert/js-comments \"Parse JavaScript code comments and generate API documentation.\")\n* [parse-comments](https://www.npmjs.com/package/parse-comments): Parse code comments from JavaScript or any language that uses the same format. | [homepage](https://github.com/jonschlinkert/parse-comments \"Parse code comments from JavaScript or any language that uses the same format.\")\n\n### Author\n\n**Jon Schlinkert**\n\n* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert)\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 12, 2018._","publish_time":1411541839497,"_cnpm_publish_time":1411541839497,"dist-tags":{"latest":"1.1.0"}}