unassert-js / unassert

Encourages programming with assertions by providing tools to compile them away.
MIT License
192 stars 13 forks source link

Support removal of assertion declaration #1

Closed twada closed 9 years ago

twada commented 9 years ago

Trying to remove declaration of assert as well.

'use strict';

var assert = require('assert');

function add (a, b) {
    assert(!isNaN(a));
    assert.equal(typeof b, 'number');
    assert.ok(!isNaN(b));
    return a + b;
}

to

'use strict';

function add(a, b) {
    return a + b;
}

TODO