Skip to content

Commit f287438

Browse files
committedAug 30, 2015
minor doc tweaks
1 parent e1f23cd commit f287438

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed
 

‎package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,14 @@
4848
"util",
4949
"utility",
5050
"wildcard",
51-
"wildcards"
51+
"wildcards",
52+
"promise"
5253
],
5354
"dependencies": {
5455
"array-union": "^1.0.1",
5556
"arrify": "^1.0.0",
5657
"glob": "^5.0.3",
57-
"object-assign": "^3.0.0",
58+
"object-assign": "^4.0.1",
5859
"pify": "^1.0.0",
5960
"pinkie-promise": "^1.0.0"
6061
},

‎readme.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ $ npm install --save globby
1919
```
2020

2121
```js
22-
var globby = require('globby');
22+
const globby = require('globby');
2323

24-
globby(['*', '!cake'], function (err, paths) {
25-
console.log(paths);
24+
globby(['*', '!cake']).then(paths => {
25+
console.log(paths)
2626
//=> ['unicorn', 'rainbows']
2727
});
2828
```
@@ -32,23 +32,24 @@ globby(['*', '!cake'], function (err, paths) {
3232

3333
### globby(patterns, [options])
3434

35+
Returns a promise that resolves to an array of matching paths.
36+
3537
### globby.sync(patterns, [options])
3638

39+
Returns an array of matching paths.
40+
3741
#### patterns
3842

39-
*Required*
4043
Type: `string`, `array`
4144

42-
See supported minimatch [patterns](https://github.com/isaacs/minimatch#usage).
45+
See supported `minimatch` [patterns](https://github.com/isaacs/minimatch#usage).
4346

4447
#### options
4548

4649
Type: `object`
4750

48-
See the node-glob [options](https://github.com/isaacs/node-glob#options).
51+
See the `node-glob` [options](https://github.com/isaacs/node-glob#options).
4952

50-
`globby.sync` synchronously returns an array of paths matching the glob expression.
51-
`globby` returns a Promise object that resolves to an array of matching paths or is rejected with an error.
5253

5354
## Globbing patterns
5455

0 commit comments

Comments
 (0)
Please sign in to comment.