Nodejs: What does `process.binding` mean?
This function returns internal module, like require. It's not public, so you shouldn't rely on it in your code, but you can use it to play with node's low level objects, if you want to understand how things work.
For example, here timer_wrap
binding is registered. It exports Timer
constructor. In lib/timers.js
it's imported
It's a feature that essentially goes out and grab the C++ feature and make it available inside the javascript .
Take this example process.binding('zlib')
that is used in zlib
This is essentially going out and getting the zlib C++ object and then it's being used the rest of the time in the javascript code.
So when you use zlib you're not actually going out and grabbing the C++ library, you're using the Javascript library that wraps the C++ feature for you.
It makes it easier to use