unassert-js / unassert

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

Support ImportNamespaceSpecifier #6

Closed twada closed 8 years ago

twada commented 8 years ago

before:

import * as assert from 'assert';

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

after:

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