Obligations
Tiny JavaScript library for preconditions, postconditions and invariants, intended for use with Contractual.
Installation
npm install obligations
Usage
var obligations = ; obligations; // always okobligations; // throws a PreconditionErrorobligations; // throws a PreconditionError with a custom message obligations; // always okobligations; // throws a PostconditionErrorobligations; // throws a PostconditionError with a custom message obligations; // always okobligations; // throws an InvariantErrorobligations; // throws a InvariantError with a custom message
License
MIT, see LICENSE.md.