You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Marek Kotewicz df4e5a70da Merge commit 'dc97c3d3ad736d79aeeb82baae6aa45015620846' as 'libnatspec/natspecjs' 10 years ago
..
dist Merge commit 'dc97c3d3ad736d79aeeb82baae6aa45015620846' as 'libnatspec/natspecjs' 10 years ago
example Merge commit 'dc97c3d3ad736d79aeeb82baae6aa45015620846' as 'libnatspec/natspecjs' 10 years ago
test Merge commit 'dc97c3d3ad736d79aeeb82baae6aa45015620846' as 'libnatspec/natspecjs' 10 years ago
.gitignore Merge commit 'dc97c3d3ad736d79aeeb82baae6aa45015620846' as 'libnatspec/natspecjs' 10 years ago
.travis.yml Merge commit 'dc97c3d3ad736d79aeeb82baae6aa45015620846' as 'libnatspec/natspecjs' 10 years ago
README.md Merge commit 'dc97c3d3ad736d79aeeb82baae6aa45015620846' as 'libnatspec/natspecjs' 10 years ago
natspec.js Merge commit 'dc97c3d3ad736d79aeeb82baae6aa45015620846' as 'libnatspec/natspecjs' 10 years ago
package.json Merge commit 'dc97c3d3ad736d79aeeb82baae6aa45015620846' as 'libnatspec/natspecjs' 10 years ago

README.md

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

Wiki