0.1.1 • Published 3 years ago
solidity-comments v0.1.1
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-commentsAPI
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.