{"_id":"get-comments","_rev":"4132910","name":"get-comments","description":"Extract javascript comments on per character basis. Comment object compatible with `acorn-extract-comments` and Esprima format.","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"}],"time":{"modified":"2026-03-01T18:40:47.000Z","created":"2015-05-26T09:58:57.438Z","1.0.1":"2015-05-30T01:13:34.374Z","1.0.0":"2015-05-29T23:15:45.305Z","0.2.0":"2015-05-26T10:50:28.576Z","0.1.0":"2015-05-26T10:48:00.155Z","0.0.0":"2015-05-26T09:58:57.438Z"},"users":{},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"repository":{"type":"git","url":"git+https://github.com/tunnckocore/get-comments.git"},"versions":{"1.0.1":{"name":"get-comments","version":"1.0.1","description":"Extract javascript comments on per character basis. Comment object compatible with `acorn-extract-comments` and Esprima format.","repository":{"type":"git","url":"git+https://github.com/tunnckocore/get-comments.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{},"devDependencies":{"assertit":"^0.1.0"},"keywords":["array","code","codecomments","comments","esprima","extract","jscomments","locations","object"],"gitHead":"b6a03518f8e397e5cbcbaed3d340181cec17185a","bugs":{"url":"https://github.com/tunnckocore/get-comments/issues"},"homepage":"https://github.com/tunnckocore/get-comments#readme","_id":"get-comments@1.0.1","_shasum":"196759101bbbc4facf13060caaedd4870dee55be","_from":".","_npmVersion":"2.10.0","_nodeVersion":"2.0.0","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"}],"dist":{"shasum":"196759101bbbc4facf13060caaedd4870dee55be","size":5923,"noattachment":false,"key":"/get-comments/-/get-comments-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-comments/download/get-comments-1.0.1.tgz"},"directories":{},"publish_time":1432948414374,"_hasShrinkwrap":false,"_cnpm_publish_time":1432948414374,"_cnpmcore_publish_time":"2021-12-16T12:22:52.024Z"},"1.0.0":{"name":"get-comments","version":"1.0.0","description":"Extract javascript comments on per character basis. Comment object compatible with `acorn-extract-comments` and Esprima format.","repository":{"type":"git","url":"git+https://github.com/tunnckocore/get-comments.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{},"devDependencies":{"assertit":"^0.1.0"},"keywords":["array","code","codecomments","comments","esprima","extract","jscomments","locations","object"],"gitHead":"fcfee7195922e62a0e0b03e6a76962f72bae8e35","bugs":{"url":"https://github.com/tunnckocore/get-comments/issues"},"homepage":"https://github.com/tunnckocore/get-comments#readme","_id":"get-comments@1.0.0","_shasum":"f4a07523410de1df6572773208e430d0caa833e9","_from":".","_npmVersion":"2.10.0","_nodeVersion":"2.0.0","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"}],"dist":{"shasum":"f4a07523410de1df6572773208e430d0caa833e9","size":5821,"noattachment":false,"key":"/get-comments/-/get-comments-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-comments/download/get-comments-1.0.0.tgz"},"directories":{},"publish_time":1432941345305,"_hasShrinkwrap":false,"_cnpm_publish_time":1432941345305,"_cnpmcore_publish_time":"2021-12-16T12:22:52.318Z"},"0.2.0":{"name":"get-comments","version":"0.2.0","description":"Extract javascript comments on per character basis. Comment object compatible with `acorn-extract-comments` and Esprima format.","repository":{"type":"git","url":"git+https://github.com/tunnckocore/get-comments.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{"has-value":"^0.2.0"},"devDependencies":{"assertit":"^0.1.0"},"keywords":["array","code","codecomments","comments","esprima","extract","jscomments","locations","object"],"gitHead":"186c0f5a376747e66cae6d11004c698a031e2d3a","bugs":{"url":"https://github.com/tunnckocore/get-comments/issues"},"homepage":"https://github.com/tunnckocore/get-comments#readme","_id":"get-comments@0.2.0","_shasum":"9794d38073c0d4b7eab516061b8b63b970770ccf","_from":".","_npmVersion":"2.10.0","_nodeVersion":"2.0.0","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"}],"dist":{"shasum":"9794d38073c0d4b7eab516061b8b63b970770ccf","size":5381,"noattachment":false,"key":"/get-comments/-/get-comments-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-comments/download/get-comments-0.2.0.tgz"},"directories":{},"publish_time":1432637428576,"_hasShrinkwrap":false,"_cnpm_publish_time":1432637428576,"_cnpmcore_publish_time":"2021-12-16T12:22:52.600Z"},"0.1.0":{"name":"get-comments","version":"0.1.0","description":"Extract javascript comments on per character basis. Comment object compatible with `acorn-extract-comments` and Esprima format.","repository":{"type":"git","url":"git+https://github.com/tunnckocore/get-comments.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{"has-value":"^0.2.0"},"devDependencies":{"assertit":"^0.1.0"},"keywords":["array","code","codecomments","comments","esprima","extract","jscomments","locations","object"],"gitHead":"442f5764d7200034db4165a11785dcda48b1a809","bugs":{"url":"https://github.com/tunnckocore/get-comments/issues"},"homepage":"https://github.com/tunnckocore/get-comments#readme","_id":"get-comments@0.1.0","_shasum":"2510195735daf77654fe16316694f16b02905fd6","_from":".","_npmVersion":"2.10.0","_nodeVersion":"2.0.0","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"}],"dist":{"shasum":"2510195735daf77654fe16316694f16b02905fd6","size":5390,"noattachment":false,"key":"/get-comments/-/get-comments-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-comments/download/get-comments-0.1.0.tgz"},"directories":{},"publish_time":1432637280155,"_hasShrinkwrap":false,"_cnpm_publish_time":1432637280155,"_cnpmcore_publish_time":"2021-12-16T12:22:52.813Z"},"0.0.0":{"name":"get-comments","version":"0.0.0","description":"extracting comment on per character basis, wip","main":"index.js","license":"MIT","author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"repository":{"type":"git","url":"git+https://github.com/tunnckocore/get-comments.git"},"scripts":{"test":"standard && node test.js"},"dependencies":{"has-value":"^0.2.0"},"devDependencies":{"assertit":"^0.1.0"},"keywords":[],"bugs":{"url":"https://github.com/tunnckocore/get-comments/issues"},"homepage":"https://github.com/tunnckocore/get-comments#readme","_id":"get-comments@0.0.0","_shasum":"9b5c39354bef1b7a88612f663a1d78f538349c62","_from":".","_npmVersion":"2.10.0","_nodeVersion":"2.0.0","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"}],"dist":{"shasum":"9b5c39354bef1b7a88612f663a1d78f538349c62","size":6430,"noattachment":false,"key":"/get-comments/-/get-comments-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-comments/download/get-comments-0.0.0.tgz"},"directories":{},"publish_time":1432634337438,"_hasShrinkwrap":false,"_cnpm_publish_time":1432634337438,"_cnpmcore_publish_time":"2021-12-16T12:22:53.036Z"}},"readme":"# get-comments [![npmjs.com][npmjs-img]][npmjs-url] [![The MIT License][license-img]][license-url] \n\n> Extract javascript comments on per character basis. Comment object compatible with `acorn-extract-comments` and Esprima format.\n\n**Notice:** It extracts only first level block comments, not include nested comments.\n\n[![code climate][codeclimate-img]][codeclimate-url] [![standard code style][standard-img]][standard-url] [![travis build status][travis-img]][travis-url] [![coverage status][coveralls-img]][coveralls-url] [![dependency status][david-img]][david-url]\n\n\n## Install\n```\nnpm i get-comments --save\nnpm test\n```\n\n\n## Usage\n> For more use-cases see the [tests](./test.js)\n\n- `<input>` **{String}** string to extract from\n- `[resType]` **{Boolean}** if true, will return array, otherwise object\n- `return` **{Array|Object}**\n\n**Example**\n```js\nvar getComments = require('get-comments');\n\nvar input = fs.readFileSync('./fixture.js', 'utf8')\nvar comments = getComments(input, true)\n//=>\n// [ {\n//   \"start\": 249,\n//   \"end\": 1353,\n//   \"type\": \"Block\",\n//   \"loc\": {\n//     \"start\": {\n//       \"line\": 12,\n//       \"column\": 0\n//     },\n//     \"end\": {\n//       \"line\": 48,\n//       \"column\": 3\n//     }\n//   },\n//   \"value\": \"*\\n * > Filtering incoming request ...\",\n//   \"api\": true,\n//   \"after\": \"module.exports = function koaIpFilter (options) {\"\n// }, {\n//   \"start\": 2187,\n//   \"end\": 2267,\n//   \"type\": \"Block\",\n//   \"loc\": {\n//     \"start\": {\n//       \"line\": 82,\n//       \"column\": 0\n//     },\n//     \"end\": {\n//       \"line\": 87,\n//       \"column\": 3\n//     }\n//   },\n//   \"value\": \"*\\n * abcd description\\n *\\n * @name koaIpFilter\\n * @param {Object} `options`\\n \",\n//   \"api\": false,\n//   \"after\": \"exports.data = function () {\"\n// } ]\n```\n\n\n## See also\n- [acorn-extract-comments](https://github.com/tunnckocore/acorn-extract-comments): Extract JavaScript code comments from a string, using `acorn`… [more](https://github.com/tunnckocore/acorn-extract-comments)\n- [acorn-strip-comments](https://github.com/tunnckocore/acorn-strip-comments): Strip code comments from given input string, using acorn javascript… [more](https://github.com/tunnckocore/acorn-strip-comments)\n- [esprima-extract-comments](https://github.com/jonschlinkert/esprima-extract-comments): Extract code comments from string or from a glob of… [more](https://github.com/jonschlinkert/esprima-extract-comments)\n- [js-comments](https://github.com/jonschlinkert/js-comments): Parse JavaScript code comments and generate API documentation.\n- [parse-comments](https://github.com/jonschlinkert/parse-comments): Parse code comments from JavaScript or any language that uses… [more](https://github.com/jonschlinkert/parse-comments)\n\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/tunnckoCore/get-comments/issues/new).  \nBut before doing anything, please read the [CONTRIBUTING.md](./CONTRIBUTING.md) guidelines.\n\n\n## [Charlike Make Reagent](http://j.mp/1stW47C) [![new message to charlike][new-message-img]][new-message-url] [![freenode #charlike][freenode-img]][freenode-url]\n\n[![tunnckocore.tk][author-www-img]][author-www-url] [![keybase tunnckocore][keybase-img]][keybase-url] [![tunnckoCore npm][author-npm-img]][author-npm-url] [![tunnckoCore twitter][author-twitter-img]][author-twitter-url] [![tunnckoCore github][author-github-img]][author-github-url]\n\n\n[npmjs-url]: https://www.npmjs.com/package/get-comments\n[npmjs-img]: https://img.shields.io/npm/v/get-comments.svg?label=get-comments\n\n[license-url]: https://github.com/tunnckoCore/get-comments/blob/master/LICENSE.md\n[license-img]: https://img.shields.io/badge/license-MIT-blue.svg\n\n\n[codeclimate-url]: https://codeclimate.com/github/tunnckoCore/get-comments\n[codeclimate-img]: https://img.shields.io/codeclimate/github/tunnckoCore/get-comments.svg\n\n[travis-url]: https://travis-ci.org/tunnckoCore/get-comments\n[travis-img]: https://img.shields.io/travis/tunnckoCore/get-comments.svg\n\n[coveralls-url]: https://coveralls.io/r/tunnckoCore/get-comments\n[coveralls-img]: https://img.shields.io/coveralls/tunnckoCore/get-comments.svg\n\n[david-url]: https://david-dm.org/tunnckoCore/get-comments\n[david-img]: https://img.shields.io/david/dev/tunnckoCore/get-comments.svg\n\n[standard-url]: https://github.com/feross/standard\n[standard-img]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg\n\n\n[author-www-url]: http://www.tunnckocore.tk\n[author-www-img]: https://img.shields.io/badge/www-tunnckocore.tk-fe7d37.svg\n\n[keybase-url]: https://keybase.io/tunnckocore\n[keybase-img]: https://img.shields.io/badge/keybase-tunnckocore-8a7967.svg\n\n[author-npm-url]: https://www.npmjs.com/~tunnckocore\n[author-npm-img]: https://img.shields.io/badge/npm-~tunnckocore-cb3837.svg\n\n[author-twitter-url]: https://twitter.com/tunnckoCore\n[author-twitter-img]: https://img.shields.io/badge/twitter-@tunnckoCore-55acee.svg\n\n[author-github-url]: https://github.com/tunnckoCore\n[author-github-img]: https://img.shields.io/badge/github-@tunnckoCore-4183c4.svg\n\n[freenode-url]: http://webchat.freenode.net/?channels=charlike\n[freenode-img]: https://img.shields.io/badge/freenode-%23charlike-5654a4.svg\n\n[new-message-url]: https://github.com/tunnckoCore/messages\n[new-message-img]: https://img.shields.io/badge/send%20me-message-green.svg","_attachments":{},"homepage":"https://github.com/tunnckocore/get-comments#readme","bugs":{"url":"https://github.com/tunnckocore/get-comments/issues"},"license":"MIT"}