Skip to content

Commit

Permalink
remove stdout usages
Browse files Browse the repository at this point in the history
  • Loading branch information
H4ad committed Jul 11, 2024
1 parent c094345 commit 8002996
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -2042,7 +2042,7 @@ This function remove the register of the object from the finalization
registry, so the callback will not be called anymore.
```cjs
const { finalization, stdout } = require('node:process');
const { finalization } = require('node:process');

// Please make sure that the function passed to finalization.register()
// does not create a closure around unnecessary objects.
Expand All @@ -2058,7 +2058,6 @@ function setup() {
const myDisposableObject = {
dispose() {
// Free your resources synchronously
stdout.write('disposed.\n');
},
};

Expand All @@ -2074,7 +2073,7 @@ setup();
```
```mjs
import { finalization, stdout } from 'node:process';
import { finalization } from 'node:process';

// Please make sure that the function passed to finalization.register()
// does not create a closure around unnecessary objects.
Expand All @@ -2090,7 +2089,6 @@ function setup() {
const myDisposableObject = {
dispose() {
// Free your resources synchronously
stdout.write('disposed.\n');
},
};

Expand Down

0 comments on commit 8002996

Please sign in to comment.