0.1.1 • Published 1 year ago

solidity-comments v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

solidity-comments

solidity-comments is an N-API library built in Rust, which exposes a single function, which takes the contents of a Solidity source file and returns its comments.

Installation

npm install solidity-comments

API

export interface AnalysisResult {
  comments: Array<Comment>;
}

export interface Comment {
  start: number
  end: number
  text: string
}

export function analyze(input: string): AnalysisResult;

Browser support

This library doesn't work in a browser.

Regenerating index.js and index.d.ts

These files have to be committed because of our current Github Actions, yet, they are autogenerated.

You can run cargo clean, yarn clean, and yarn build to recreate them.