Package Exports
- get-comments
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (get-comments) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
get-comments

Extract javascript comments on per character basis. Comment object compatible with
acorn-extract-comments
and Esprima format.
Notice: It extracts only first level block comments.
Install
npm i get-comments --save
npm test
Usage
For more use-cases see the tests
var getComments = require('get-comments');
var input = fs.readFileSync('./fixture.js', 'utf8')
var comments = getComments(input, true)
//=>
// [ {
// "start": 249,
// "end": 1353,
// "type": "Block",
// "loc": {
// "start": {
// "line": 12,
// "column": 0
// },
// "end": {
// "line": 48,
// "column": 3
// }
// },
// "value": "/**\n * > Filtering incoming request ...",
// "api": true,
// "after": "module.exports = function koaIpFilter (options) {"
// },
// {
// "start": 2187,
// "end": 2267,
// "type": "Block",
// "loc": {
// "start": {
// "line": 82,
// "column": 0
// },
// "end": {
// "line": 87,
// "column": 3
// }
// },
// "value": "/**\n * abcd description\n *\n * @name koaIpFilter\n * @param {Object} `options`\n */",
// "api": false,
// "after": "exports.data = function () {\n return true\n}"
// } ]
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.