mirror of
https://github.com/nodejs/node.git
synced 2025-05-08 01:35:51 +00:00

Since we do not actually use the Console constructor to instantiate the global console, move the two piece of code into two different JS files for clarity, and make console.js a mere re-export of the global console. The hope is to make the global console, a namespace, more web-compatible while keeping the Console constructor available for backwards compatibility. PR-URL: https://github.com/nodejs/node/pull/24709 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
17 lines
443 B
JavaScript
17 lines
443 B
JavaScript
// Flags: --expose-internals
|
|
'use strict';
|
|
|
|
// This list must be computed before we require any modules to
|
|
// to eliminate the noise.
|
|
const list = process.moduleLoadList.slice();
|
|
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
|
|
const isMainThread = common.isMainThread;
|
|
const kMaxModuleCount = isMainThread ? 58 : 80;
|
|
|
|
assert(list.length <= kMaxModuleCount,
|
|
`Total length: ${list.length}\n` + list.join('\n')
|
|
);
|