I've seen process.binding('...')
many times while researching through the node.js source code on github.
Can anybody explain me what this function does?
For the binding process, the loose sheets of printed pages that constitute the magazine are draped together over a saddle-like holder (hence the term saddle stitching). The wire is fed into position, cut to a short length, bent into shape, and then the legs of the staple are driven through the pages.
Node. js bindings are series of methods that can be used in Node. js code which are in reality just running C++ code behind the scenes.
Node. js provides the facility to get process information such as process id, architecture, platform, version, release, uptime, upu usage etc. It can also be used to kill process, set uid, set groups, unmask etc. The process is a global object, an instance of EventEmitter, can be accessed from anywhere.
The process. argv() method is used for returning all the command-line arguments that were passed when the Node. js process was being launched. The first element will always contains the same value as process.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With