0.0.1 • Published 10 years ago

auditval v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

auditval

The auditval module provides functions for creating auditable numeric types.

Usage

Use the auditval.audited function to created an audited value from a numeric type.

// start with an initial value of 0
var auditval = require("auditval"),
    value = auditval.audited(0);

// make some adjustments
value.adjust("increasing value", new Date(), 3);
value.adjust("decreasing value", new Date(), -2);

// verify value
assert(value + 5 == 6);

// retrieve a log of all of the value adjustments
var audit_log = value.audit();
0.0.1

10 years ago