keccak384 / natspec.js-118

Javascript Library used to evaluate natspec expressions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

natspec.js

Javascript Library used to evaluate natspec expressions

Build Status Coverage Status

Usage

It exposes global object natspec with method evaluateExpression.

var natspec = require('natspec');

var natspecExpression = "Will multiply `a` by 7 and return `a * 7`.";
var call = {
    method: 'multiply',
    abi: abi,
    transaction: transaction
};

var evaluatedExpression = natspec.evaluateExpression(natspecExpression, call);
console.log(evaluatedExpression); // "Will multiply 4 by 7 and return 28."

More examples are available here.

Building

npm run-script build

Testing (mocha)

npm test

Testing (go)

go test

Wiki

About

Javascript Library used to evaluate natspec expressions


Languages

Language:JavaScript 72.5%Language:Go 27.2%Language:Shell 0.2%Language:HTML 0.1%