3 ms·
It's a Coffee syntax thing. ws.on 'close', -> ps.kill() That compiles to: ws.on('close', function() { return ps.kill(); });
by jbrooksuk 13y ago
It's a Coffee syntax thing.
ws.on 'close', -> ps.kill()
That compiles to:
ws.on('close', function() {
return ps.kill();
});
- thu 13y agoI have never done any Coffee but it looks like arguments are separated by commas, and, in this case, the second argument is a function of no argument (so the left hand side of the arrow is empty). Edit: it was meant to be a reply to the parent.