mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
lib: migrate process.binding to getOptions
PR-URL: https://github.com/nodejs/node/pull/23522 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
1 parent
e9efac6dfd
commit
ff5f1fb0cd
1 file changed
+3
-1
@@ -9,6 +9,8 @@ const {
|
||||
CHAR_HASH,
|
||||
} = require('internal/constants');
|
||||
|
||||
const { getOptions } = internalBinding('options');
|
||||
|
||||
// Invoke with makeRequireFunction(module) where |module| is the Module object
|
||||
// to use as the context for the require() function.
|
||||
function makeRequireFunction(mod) {
|
||||
@@ -105,7 +107,7 @@ const builtinLibs = [
|
||||
'v8', 'vm', 'zlib'
|
||||
];
|
||||
|
||||
if (process.binding('config').experimentalWorker) {
|
||||
if (getOptions('--experimental-worker')) {
|
||||
builtinLibs.push('worker_threads');
|
||||
builtinLibs.sort();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user