Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reminjp/node-lizard-py
Lizard on npm.
https://github.com/reminjp/node-lizard-py
lizard nodejs
Last synced: about 1 month ago
JSON representation
Lizard on npm.
- Host: GitHub
- URL: https://github.com/reminjp/node-lizard-py
- Owner: reminjp
- License: mit
- Created: 2017-05-26T19:28:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-11-21T02:50:49.000Z (about 1 month ago)
- Last Synced: 2024-11-21T03:25:34.714Z (about 1 month ago)
- Topics: lizard, nodejs
- Language: TypeScript
- Homepage:
- Size: 2.02 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lizard on npm
[![Latest NPM release][npm-badge]][npm-badge-url]
[![Install Size][npm-size-badge]][npm-size-badge-url]
[![License][license-badge]][license-badge-url]A Node.js wrapper for [Lizard](https://github.com/terryyin/lizard), a code complexity analyser.
## Requirements
- Node.js
- Python## Usage
```
yarn add lizard-py
```### Sample code
```ts
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.
```ts
const result = lizard.analyzeSourceCode('foo.cpp', 'int foo(){}');
```[Sample input and output](./__tests__)
## Licence
[![License][license-badge]][license-badge-url]
[npm-badge]: https://img.shields.io/npm/v/lizard-py.svg
[npm-badge-url]: https://www.npmjs.com/package/lizard-py
[npm-size-badge]: https://packagephobia.now.sh/badge?p=lizard-py
[npm-size-badge-url]: https://packagephobia.now.sh/result?p=lizard-py
[license-badge]: https://img.shields.io/npm/l/lizard-py.svg
[license-badge-url]: ./LICENSE