Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
30
rated 0 times [  35] [ 5]  / answers: 1 / hits: 17654  / 10 Years ago, wed, june 4, 2014, 12:00:00

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?


More From » c++

 Answers
28

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


[#70727] Tuesday, June 3, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
katharinek

Total Points: 302
Total Questions: 105
Total Answers: 123

Location: Austria
Member since Thu, Jan 7, 2021
3 Years ago
;