'use strict';
var assert = require('assert');
function add (a, b) {
if (!isNaN(a)) assert(0 < a);
if (typeof b === 'number') {
assert(0 < b);
}
if (typeof a === 'number')
assert(0 < a);
else if (typeof b === 'number')
assert(0 < b);
else
assert(false);
return a + b;
}
becomes
'use strict';
function add(a, b) {
if (!isNaN(a)) {
}
if (typeof b === 'number') {
}
if (typeof a === 'number') {
} else if (typeof b === 'number') {
} else {
}
return a + b;
}
Dealing with IfStatement without curly braces.
refs twada/unassert#7
becomes