js-analyse
v0.2.3
Published
Javascript analysis tool
Downloads
1
Readme
js-analyse
Analyse javascript code.
Installation
$ npm install js-analyse
Usage
var Analyse = require('js-analyse')
var a = Analyse(`// LLOC 1
foo();
// LLOC 2 & 3
bar(); foo();`)
a.lloc() // => 3
API
Analyse(code)
code
- code to analyse
.lloc()
Returns: Logical lines of code.
.expressionCount(name)
name
- name of expression to count
Returns: number of times expression is used in code
License
MIT