0.1.4 • Published 2 years ago

solidity-comments-extractors v0.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

solidity-comments-extractor

Extract comments from Solidity code

How to

const expect = require('expect');
const extractComments = require('./index');

const code = `
// this is a contract
contract Foo {
}
`;

const comments = extractComments(code);

expect(comments).toEqual([
  {
    range: [1, 22],
    raw: ' this is a contract',
    type: 'LineComment',
    value: ' this is a contract'
  }
]);
0.1.4

2 years ago

0.1.5

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.9

2 years ago

0.0.1

2 years ago

0.0.8

2 years ago