🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

solidity-comments

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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.

0.1.1
latest
Source
npm
Version published
Weekly downloads
14K
-15.78%
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 23 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts