We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb2cbf2 commit 030b744Copy full SHA for 030b744
lib/internal/bootstrap/node.js
@@ -347,6 +347,12 @@ function setupProcessObject() {
347
const origProcProto = Object.getPrototypeOf(process);
348
Object.setPrototypeOf(origProcProto, EventEmitter.prototype);
349
EventEmitter.call(process);
350
+ Object.defineProperty(process, Symbol.toStringTag, {
351
+ enumerable: false,
352
+ writable: false,
353
+ configurable: false,
354
+ value: 'process'
355
+ });
356
// Make process globally available to users by putting it on the global proxy
357
global.process = process;
358
}
test/es-module/test-esm-process.mjs
@@ -0,0 +1,6 @@
1
+// Flags: --experimental-modules
2
+import '../common';
3
+import assert from 'assert';
4
+import process from 'process';
5
+
6
+assert.strictEqual(Object.prototype.toString.call(process), '[object process]');
0 commit comments