Version: 0.3.00.3.10.3.20.4.00.4.10.4.20.4.30.4.40.4.50.4.60.4.70.4.80.4.90.4.100.4.110.4.120.4.130.5.10.5.20.5.30.5.50.5.60.5.70.6.00.6.10.6.20.6.30.6.40.7.00.7.10.7.20.7.30.7.40.7.50.7.70.7.80.7.90.7.100.7.110.7.120.7.130.7.140.7.150.7.160.7.17
function fibo (n) {
return n > 1 ? fibo(n - 1) + fibo(n - 2) : 1;
}
thread.on('giveMeTheFibo', function onGiveMeTheFibo (data) {
this.emit('theFiboIs', fibo(+data)); //Emits 'theFiboIs' in the parent/main thread.
});