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 Nov 29, 2018
1 parent 98b4a94 commit 9b22e2a
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 9b22e2a

Please sign in to comment.