{"_id":"esprima-extract-comments","_rev":"93034","name":"esprima-extract-comments","description":"Extract code comments from string or from a glob of files using esprima.","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:30:52.000Z","created":"2014-09-24T06:57:19.497Z","1.1.0":"2018-02-12T11:21:52.699Z","1.0.1":"2018-02-12T07:59:02.410Z","1.0.0":"2018-02-12T06:10:46.843Z","0.2.1":"2015-12-30T09:07:12.647Z","0.1.3":"2015-11-10T13:26:19.736Z","0.2.0":"2015-11-10T13:18:46.333Z","0.1.2":"2014-11-27T14:42:14.470Z","0.1.0":"2014-09-24T06:57:19.497Z"},"users":{"darlanalves":true,"sbruchmann":true},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/esprima-extract-comments.git"},"versions":{"1.1.0":{"name":"esprima-extract-comments","description":"Extract code comments from string or from a glob of files using esprima.","version":"1.1.0","homepage":"https://github.com/jonschlinkert/esprima-extract-comments","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/esprima-extract-comments.git"},"bugs":{"url":"https://github.com/jonschlinkert/esprima-extract-comments/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=4"},"scripts":{"test":"mocha"},"dependencies":{"esprima":"^4.0.0"},"devDependencies":{"gulp-format-md":"^1.0.0","mocha":"^3.5.3"},"keywords":["block","code","comment","comments","context","esprima","extract","glob","javascript","parse"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["extract-comments","js-comments","parse-comments"]},"lint":{"reflinks":true}},"gitHead":"b42674ed3c2c8b237d7a94af37666e0f20e8f930","_id":"esprima-extract-comments@1.1.0","_npmVersion":"5.6.0","_nodeVersion":"9.1.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"shasum":"0dacab567a5900240de6d344cf18c33617becbc9","size":3394,"noattachment":false,"key":"/esprima-extract-comments/-/esprima-extract-comments-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/esprima-extract-comments/download/esprima-extract-comments-1.1.0.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/esprima-extract-comments_1.1.0_1518434511943_0.04834056107261375"},"_hasShrinkwrap":false,"publish_time":1518434512699,"_cnpm_publish_time":1518434512699},"1.0.1":{"name":"esprima-extract-comments","description":"Extract code comments from string or from a glob of files using esprima.","version":"1.0.1","homepage":"https://github.com/jonschlinkert/esprima-extract-comments","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/esprima-extract-comments.git"},"bugs":{"url":"https://github.com/jonschlinkert/esprima-extract-comments/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=4"},"scripts":{"test":"mocha"},"dependencies":{"esprima":"^4.0.0"},"devDependencies":{"gulp-format-md":"^1.0.0","mocha":"^3.5.3"},"keywords":["block","code","comment","comments","context","esprima","extract","glob","javascript","parse"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["extract-comments","js-comments","parse-comments"]},"lint":{"reflinks":true}},"gitHead":"f85576e0009794759db3321d017bd956e0152abf","_id":"esprima-extract-comments@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"9.1.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"shasum":"02542c3be663e9ab39d0581b406c545bdb739f7d","size":3222,"noattachment":false,"key":"/esprima-extract-comments/-/esprima-extract-comments-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/esprima-extract-comments/download/esprima-extract-comments-1.0.1.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/esprima-extract-comments_1.0.1_1518422341676_0.7163257957475329"},"_hasShrinkwrap":false,"publish_time":1518422342410,"_cnpm_publish_time":1518422342410},"1.0.0":{"name":"esprima-extract-comments","description":"Extract code comments from string or from a glob of files using esprima.","version":"1.0.0","homepage":"https://github.com/jonschlinkert/esprima-extract-comments","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/esprima-extract-comments.git"},"bugs":{"url":"https://github.com/jonschlinkert/esprima-extract-comments/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=4"},"scripts":{"test":"mocha"},"dependencies":{"esprima":"^4.0.0"},"devDependencies":{"gulp-format-md":"^1.0.0","mocha":"^3.5.3"},"keywords":["block","code","comment","comments","context","esprima","extract","glob","javascript","parse"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["extract-comments","js-comments","parse-comments"]},"lint":{"reflinks":true}},"gitHead":"02d2d16df7335208461c8cb856c8315c36fd0563","_id":"esprima-extract-comments@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.1.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"shasum":"ecfffc5c8fee55972225d2fa3c2eab2fb8995caf","size":3216,"noattachment":false,"key":"/esprima-extract-comments/-/esprima-extract-comments-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/esprima-extract-comments/download/esprima-extract-comments-1.0.0.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/esprima-extract-comments_1.0.0_1518415846100_0.6399219242711554"},"_hasShrinkwrap":false,"publish_time":1518415846843,"_cnpm_publish_time":1518415846843},"0.2.1":{"name":"esprima-extract-comments","description":"Extract code comments from string or from a glob of files using esprima.","version":"0.2.1","homepage":"https://github.com/jonschlinkert/esprima-extract-comments","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/esprima-extract-comments.git"},"bugs":{"url":"https://github.com/jonschlinkert/esprima-extract-comments/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.8"},"scripts":{"test":"mocha"},"dependencies":{"esprima":"^2.7.1"},"keywords":["block","code","comment","comments","context","esprima","extract","glob","javascript","parse"],"verb":{"related":{"list":["extract-comments","js-comments","parse-comments"]},"plugins":["gulp-format-md"]},"gitHead":"82330861ff0b9322747d5890aa8312d427d32de2","_id":"esprima-extract-comments@0.2.1","_shasum":"9018d8df37ffd95dd615015a8c5f0475ed743423","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"9018d8df37ffd95dd615015a8c5f0475ed743423","size":2365,"noattachment":false,"key":"/esprima-extract-comments/-/esprima-extract-comments-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/esprima-extract-comments/download/esprima-extract-comments-0.2.1.tgz"},"directories":{},"publish_time":1451466432647,"_cnpm_publish_time":1451466432647,"_hasShrinkwrap":false},"0.1.3":{"name":"esprima-extract-comments","description":"Extract code comments from string or from a glob of files using esprima.","version":"0.1.3","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"},"dependencies":{"esprima":"^2.7.0","lodash":"^2.4.1","map-files":"^0.2.2"},"gitHead":"6b65a0f52f85bc6fa830d44e352ec3da9e9ef620","_id":"esprima-extract-comments@0.1.3","_shasum":"ce4f3024b601657a12a655df6bf3eb0a3b190120","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"ce4f3024b601657a12a655df6bf3eb0a3b190120","size":11291,"noattachment":false,"key":"/esprima-extract-comments/-/esprima-extract-comments-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/esprima-extract-comments/download/esprima-extract-comments-0.1.3.tgz"},"directories":{},"publish_time":1447161979736,"_cnpm_publish_time":1447161979736,"_hasShrinkwrap":false},"0.2.0":{"name":"esprima-extract-comments","description":"Extract code comments from string or from a glob of files using esprima.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/esprima-extract-comments","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/esprima-extract-comments.git"},"bugs":{"url":"https://github.com/jonschlinkert/esprima-extract-comments/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.8"},"scripts":{"test":"mocha"},"dependencies":{"esprima":"^2.7.0","extend-shallow":"^2.0.1"},"keywords":["block","code","comment","comments","context","esprima","extract","glob","javascript","parse"],"verb":{"related":{"list":["extract-comments","parse-comments","js-comments"]}},"gitHead":"774db35b9a0c656e1297289cf673fb604952d13e","_id":"esprima-extract-comments@0.2.0","_shasum":"e06dc54f368dc31f13d19e042bcf0b2ae02432fb","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"e06dc54f368dc31f13d19e042bcf0b2ae02432fb","size":2344,"noattachment":false,"key":"/esprima-extract-comments/-/esprima-extract-comments-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/esprima-extract-comments/download/esprima-extract-comments-0.2.0.tgz"},"directories":{},"publish_time":1447161526333,"_cnpm_publish_time":1447161526333,"_hasShrinkwrap":false},"0.1.2":{"name":"esprima-extract-comments","description":"Extract code comments from string or from a glob of files using esprima.","version":"0.1.2","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"},"dependencies":{"esprima":"git+https://git@github.com/ariya/esprima","lodash":"^2.4.1","map-files":"^0.2.2"},"_id":"esprima-extract-comments@0.1.2","_shasum":"ada6e340e7ffb91d6f7f922cd3a18874a7bfbcf5","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"ada6e340e7ffb91d6f7f922cd3a18874a7bfbcf5","size":11403,"noattachment":false,"key":"/esprima-extract-comments/-/esprima-extract-comments-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/esprima-extract-comments/download/esprima-extract-comments-0.1.2.tgz"},"directories":{},"publish_time":1417099334470,"_cnpm_publish_time":1417099334470,"_hasShrinkwrap":false},"0.1.0":{"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":"doowb","email":"brian.woodward@gmail.com"},{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"bbef6ab5563bd14c5d539a3873c298655406ac0e","size":11458,"noattachment":false,"key":"/esprima-extract-comments/-/esprima-extract-comments-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/esprima-extract-comments/download/esprima-extract-comments-0.1.0.tgz"},"directories":{},"publish_time":1411541839497,"_cnpm_publish_time":1411541839497,"_hasShrinkwrap":false}},"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._","_attachments":{},"homepage":"https://github.com/jonschlinkert/esprima-extract-comments","bugs":{"url":"https://github.com/jonschlinkert/esprima-extract-comments/issues"},"license":"MIT"}