File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/content/docs/workers/runtime-apis/nodejs Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -58,16 +58,17 @@ were set previously and will cause unexpected behavior for other Workers running
5858same isolate. Specifically, it would cause inconsistency with the ` process .env ` object when
5959accessed via named imports.
6060
61- ` ` ` ` js
62- import * as process from ' node:process' ;
63- import { env } from ' node:process' ;
61+ ` ` ` js
62+ import * as process from " node:process" ;
63+ import { env } from " node:process" ;
6464
6565process .env === env; // true! they are the same object
6666process .env = {}; // replace the object! Do not do this!
6767process .env === env; // false! they are no longer the same object
6868
6969// From this point forward, any changes to process.env will not be reflected in env,
7070// and vice versa!
71+ ` ` `
7172
7273## ` process .nextTick ()`
7374
@@ -82,7 +83,7 @@ console.log(env["FOO"]); // Prints: bar
8283nextTick (() => {
8384 console .log (" next tick" );
8485});
85- ` ` ` `
86+ ` ` `
8687
8788## Stdio
8889
You can’t perform that action at this time.
0 commit comments