Skip to content

Commit

Permalink
remove stdout usages
Browse files Browse the repository at this point in the history
  • Loading branch information
H4ad committed Jun 24, 2024
1 parent ce0f03a commit a9b9fe6
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 @@ -2026,7 +2026,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 @@ -2042,7 +2042,6 @@ function setup() {
const myDisposableObject = {
dispose() {
// Free your resources synchronously
stdout.write('disposed.\n');
},
};

Expand All @@ -2058,7 +2057,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 @@ -2074,7 +2073,6 @@ function setup() {
const myDisposableObject = {
dispose() {
// Free your resources synchronously
stdout.write('disposed.\n');
},
};

Expand Down

0 comments on commit a9b9fe6

Please sign in to comment.