Skip to content

Commit

Permalink
lib: migrate process.binding to getOptions
Browse files Browse the repository at this point in the history
PR-URL: #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 jasnell committed Oct 17, 2018
1 parent e9efac6 commit ff5f1fb
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 ff5f1fb

Please sign in to comment.