Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: remove unnecessary module format comments #39219

Merged
merged 1 commit into from
Jul 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,20 @@ way modeled on standard POSIX functions.
To use the promise-based APIs:

```mjs
// Using ESM Module syntax:
import * as fs from 'fs/promises';
```

```cjs
// Using CommonJS syntax:
const fs = require('fs/promises');
```

To use the callback and sync APIs:

```mjs
// Using ESM Module syntax:
import * as fs from 'fs';
```

```cjs
// Using CommonJS syntax:
const fs = require('fs');
```

Expand All @@ -44,7 +40,6 @@ Promise-based operations return a promise that is fulfilled when the
asynchronous operation is complete.

```mjs
// Using ESM Module syntax:
import { unlink } from 'fs/promises';

try {
Expand All @@ -56,7 +51,6 @@ try {
```

```cjs
// Using CommonJS syntax
const { unlink } = require('fs/promises');

(async function(path) {
Expand All @@ -78,7 +72,6 @@ reserved for an exception. If the operation is completed successfully, then
the first argument is `null` or `undefined`.

```mjs
// Using ESM syntax
import { unlink } from 'fs';

unlink('/tmp/hello', (err) => {
Expand All @@ -88,7 +81,6 @@ unlink('/tmp/hello', (err) => {
```

```cjs
// Using CommonJS syntax
const { unlink } = require('fs');

unlink('/tmp/hello', (err) => {
Expand All @@ -108,7 +100,6 @@ execution until the operation is complete. Exceptions are thrown immediately
and can be handled using `try…catch`, or can be allowed to bubble up.

```mjs
// Using ESM syntax
import { unlinkSync } from 'fs';

try {
Expand All @@ -120,7 +111,6 @@ try {
```

```cjs
// Using CommonJS syntax
const { unlinkSync } = require('fs');

try {
Expand Down Expand Up @@ -6339,7 +6329,6 @@ It is important to correctly order the operations by awaiting the results
of one before invoking the other:

```mjs
// Using ESM syntax
import { rename, stat } from 'fs/promises';

const from = '/tmp/hello';
Expand All @@ -6355,7 +6344,6 @@ try {
```

```cjs
// Using CommonJS syntax
const { rename, stat } = require('fs/promises');

(async function(from, to) {
Expand Down