module: addBuiltinLibsToObject refactoring
-
Replace
forEach
loop byfor
loop for several reasons. One of them being performance. Loop over a small array is fast anyway, but this will make code more consistent across the project. Feels like Node.js is trying to be as fast as possible -
Move
setReal
function definition out of the loop and make it bindable. Defining a function inside loop is considered bad practice in general. -
Predefine
configurable
andenumerable
as these are staying consistent across the function.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
internal/module