rogeriopradoj/box-calculator.js

Série de cálculos usados na Box, some calculations done at Box

1.1.0 2014-02-12 19:42 UTC

README

Série de cálculos usados na Box / some calculations done at Box

Port of PHP's rogeriopradoj/box-calculator for JavaScript.

Usage

    <!-- include script in your html -->
    <script src="box-calculator.js"></script>
    <!-- maybe use this tag for testing: <script src="https://raw.github.com/rogeriopradoj/box-calculator.js/master/box-calculator.js"></script> -->

    <script>
        // apf dv
        var apf           = '1234567';
        var calculatorApf = RogerioPradoJ.BoxCalculator.Apf;
        var dvApf         = calculatorApf.dvApf(apf);
        console.log("Apf: %s, Dv: %s", apf, dvApf); // should print Apf: 1234567, Dv: 05 in your browser log

    </script>

Package Managers

  • Composer: rogeriopradoj/box-calculator.js

Testing

It's using QUnit for testing.

Just open test.html in your browser to see the magic taking place.

License

MIT