Skip to content

Commit

Permalink
lib: migrate process.binding to getOptions
Browse files Browse the repository at this point in the history
PR-URL: nodejs#23522
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
randy5235 authored and BridgeAR committed Oct 15, 2018
1 parent 0fab842 commit b78d448
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/internal/modules/cjs/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -105,7 +107,7 @@ const builtinLibs = [
'v8', 'vm', 'zlib'
];

if (process.binding('config').experimentalWorker) {
if (getOptions('--experimental-worker')) {
builtinLibs.push('worker_threads');
builtinLibs.sort();
}
Expand Down

0 comments on commit b78d448

Please sign in to comment.