npm.io
0.0.3 • Published 6 years ago

lizard-py

Licence
MIT
Version
0.0.3
Deps
0
Size
4.1 MB
Vulns
0
Weekly
0
Stars
2

Lizard on npm

Latest NPM release Install Size License

A Node.js wrapper for Lizard, a code complexity analyser.

Requirements

  • Node.js
  • Python

Usage

yarn add lizard-py
Sample code
import * as lizard from 'lizard-py';

const result = lizard.analyzeFile('fizzbuzz.cpp');
const s = JSON.stringify(result);
console.log(s);

You can also use source code string instead of file.

const result = lizard.analyzeSourceCode('foo.cpp', 'int foo(){}');

Sample input and output

Licence

License