laconbass laconbass - 5 months ago 20x
Javascript Question

Nodejs: What does `process.binding` mean?

I've seen

many times while researching through the node.js source code on github.

Can anybody explain me what this function does?


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