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 <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>
  • Loading branch information
randy5235 authored and MylesBorins committed Oct 30, 2018
1 parent b7d4404 commit 100ed74
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 100ed74

Please sign in to comment.