|
|
|
|
|
by jond3k
3594 days ago
|
|
To solve the readability issue, why not use Babel to transpile JS expressions into the equivalent syntax? To generate the first example in the readme: import {solve} from 'logic'
function father(x,y) {
return x =='mcbob' && y == 'bob' ||
x =='bob' && y == 'bill';
}
solve(father) // a noop function used as a marker by babel
|
|
Made a Babel transform real quick for this particular example:
http://astexplorer.net/#/ZT6HYai08w