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:
Randy Wressell authored and James M Snell committed 2018-10-17 11:30:08 -07:00
1 parent e9efac6dfd
commit ff5f1fb0cd
1 file changed
+3 -1
+3 -1
View File
@@ -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();
}