Commit aa29749 1 parent 6cd7609 commit aa29749 Copy full SHA for aa29749
File tree 3 files changed +14
-9
lines changed
3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 3
3
- osx
4
4
language : node_js
5
5
node_js :
6
+ - ' 11'
6
7
- ' 10'
7
8
- ' 8'
Original file line number Diff line number Diff line change @@ -7,20 +7,24 @@ const macos = require('./lib/macos');
7
7
const linux = require ( './lib/linux' ) ;
8
8
const windows = require ( './lib/windows' ) ;
9
9
10
- module . exports = ( iterable , options ) => pTry ( ( ) => {
11
- iterable = [ ... ( typeof iterable === 'string' ? [ iterable ] : iterable ) ] . map ( String ) ;
10
+ module . exports = ( paths , options ) => pTry ( ( ) => {
11
+ paths = ( typeof paths === 'string' ? [ paths ] : paths ) . map ( String ) ;
12
12
13
13
options = {
14
14
glob : true ,
15
15
...options
16
16
} ;
17
17
18
18
// TOOD: Upgrading to latest `globby` version is blocked by https://github.com/mrmlnc/fast-glob/issues/110
19
- const paths = ( options . glob === false ? iterable : globby . sync ( iterable , {
20
- expandDirectories : false ,
21
- nodir : false ,
22
- nonull : true
23
- } ) )
19
+ if ( options . glob ) {
20
+ paths = globby . sync ( paths , {
21
+ expandDirectories : false ,
22
+ nodir : false ,
23
+ nonull : true
24
+ } ) ;
25
+ }
26
+
27
+ paths = paths
24
28
. map ( filePath => path . resolve ( filePath ) )
25
29
. filter ( filePath => {
26
30
try {
Original file line number Diff line number Diff line change 2
2
3
3
> Move files and folders to the trash
4
4
5
- [ ![ Build Status] ( https://travis-ci.org /sindresorhus/trash.svg?branch=master )] ( https://travis-ci.org /sindresorhus/trash )
5
+ [ ![ Build Status] ( https://travis-ci.com /sindresorhus/trash.svg?branch=master )] ( https://travis-ci.com /sindresorhus/trash )
6
6
7
7
Works on macOS, Linux, and Windows.
8
8
@@ -35,7 +35,7 @@ Returns a `Promise`.
35
35
36
36
#### input
37
37
38
- Type: ` Iterable< string> `
38
+ Type: ` string ` ` string[] `
39
39
40
40
Accepts paths and [ glob patterns] ( https://github.com/sindresorhus/globby#globbing-patterns ) .
41
41
You can’t perform that action at this time.
0 commit comments