extract-comments
extract-comments copied to clipboard
Support for classes
Will there be support for extracting comments from ES6 classes?
Example: Contents of sample.js
file:
class SomeName {
// A public property.
version = "0.1.0";
// A private property.
#items = [];
// A public method.
listItems = () => this.#items;
}
Test case:
> const extract = require('extract-comments');
> const fs = require('fs');
> let contents = fs.readFileSync('sample.js').toString();
> extract(contentsSample)
[]
I would expect three extracted comments but the array is empty.