0.0.2 • Published 8 years ago

homomorphic-js v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Easy way to do Homomorphic Javascript

Build Status Known Vulnerabilities npm version codecov.io Code Climate

This library exports a homoMorph method, that let's you wrap your functions in type checks

    var types = homomorphicJs.types;
    var sumToString = homomorphicJs.homoMorph(types.num, types.num, types.str)(function(nr1, nr2){ 
        return (nr1 + nr2).toString(); 
    });
    sumToString(1,2); // String "3"
    sumToString(1, "2"); // TypeError "number expected, string given"
0.0.2

8 years ago

0.0.1

8 years ago