contract

0.1.2 • Public • Published

contracts

Work in process.

Based on design by contract.

Motivation :

var f = function(a, b) {
	return a + b;
}

var f = f.pre(function(a, b) {
	a.should.be.a("number").and.above(0);
	b.should.be.a("number").and.above(0);
}).post(function(ret, a, b) {
	ret.should.be.equal(a + b);
});

/contract/

    Package Sidebar

    Install

    npm i contract

    Weekly Downloads

    175

    Version

    0.1.2

    License

    none

    Last publish

    Collaborators

    • raynos