Skip to content

Commit 9e17de8

Browse files
mrienstrasindresorhus
andauthoredOct 9, 2022
Document dot option (#148)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
1 parent 5345ef6 commit 9e17de8

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
 

‎readme.md

+28
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,34 @@ const deletedPaths = await deleteAsync(['temp/*.js'], {dryRun: true});
9696
console.log('Files and directories that would be deleted:\n', deletedPaths.join('\n'));
9797
```
9898

99+
##### dot
100+
101+
Type: `boolean`\
102+
Default: `false`
103+
104+
Allow patterns to match files/folders that start with a period (`.`).
105+
106+
This option is passed through to [`fast-glob`](https://github.com/mrmlnc/fast-glob#dot).
107+
108+
Note that an explicit dot in a portion of the pattern will always match dot files.
109+
110+
**Example**
111+
112+
```
113+
directory/
114+
├── .editorconfig
115+
└── package.json
116+
```
117+
118+
```js
119+
import {deleteSync} from 'del';
120+
121+
deleteSync('*', {dot: false});
122+
//=> ['package.json']
123+
deleteSync('*', {dot: true});
124+
//=> ['.editorconfig', 'package.json']
125+
```
126+
99127
##### concurrency
100128

101129
Type: `number`\

0 commit comments

Comments
 (0)
Please sign in to comment.