process.nextTick()
simply runs a callback later.
In a browser, this is simulated using setTimeout(func, 0)
, setImmediate
, or requestAnimationFrame()
.
__dirnamne
and __filename
are simply variables that browserify injects at compile-time based on the original path to the file.