stat-comment

0.0.9 • Public • Published

stat-comment

A little tool to extract comments based on acorn and uglify-js.

NPM version Build Status

Usage

Firstly, install stat-comment as a development dependency:

npm install stat-comment --save-dev
//input.js
stat('auto.click.stat', 'click'); //Iamcomment
 
function stat(a, b) {
 
}
 
stat('tap'); /*tap event*/
const Stat = require('stat-comment');
const fs = require('fs');
const code = fs.readFileSync('./input.js');
Stat.parse(code);
Stat.exportReport();

open output/report.html to see the result.

method

  • parse: parse the code to get the comments and arguments
  • parseComments: get the comments
  • exportReport: export the default report of the result
  • output: output the parsed result into file

License

MIT License

Package Sidebar

Install

npm i stat-comment

Weekly Downloads

1

Version

0.0.9

License

MIT

Last publish

Collaborators

  • daizch