Skip to content

Commit

Permalink
fixing list violation of code style in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
prettydiff committed Sep 2, 2023
1 parent e4d1b96 commit c42f47c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1360,9 +1360,9 @@ Example with filtered recursion.
import { readdir } from 'node:fs/promises';
try {
const files = await readdir(path, { recursive: function (directory, depth) {
const files = await readdir(path, { recursive: function(directory, depth) {
return (directory.includes('system') && depth < 5);
}});
} });
for (const file of files)
console.log(file);
} catch (err) {
Expand All @@ -1378,13 +1378,13 @@ import { readdir } from 'node:fs/promises';
try {
const files = await readdir(path, {
withFileTypes: true,
recursive: function (dirent, depth) {
recursive: function(dirent, depth) {
return (
dirent.name.includes('system') &&
dirent.path.includes('games') &&
depth < 5
);
}
},
});
for (const file of files)
console.log(file);
Expand Down Expand Up @@ -3743,7 +3743,7 @@ function callback(err, files) {
fs.readdir(path, {
recursion: function(directory, depth) {
return (directory.includes('system') && depth < 5);
}
},
}, callback);
```
Expand All @@ -3765,7 +3765,7 @@ fs.readdir(path, {
dirent.path.includes('games') &&
depth < 5
);
}
},
}, callback);
```
Expand Down Expand Up @@ -5863,7 +5863,7 @@ import { readdir } from 'node:fs';
const files = fs.readdir(path, {
recursion: function(directory, depth) {
return (directory.includes('system') && depth < 5);
}
},
});
```
Expand All @@ -5880,7 +5880,7 @@ const files = fs.readdir(path, {
dirent.path.includes('games') &&
depth < 5
);
}
},
});
```
Expand Down

0 comments on commit c42f47c

Please sign in to comment.