mkdirp-promise
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"name": "mkdirp-promise", | ||
@@ -4,0 +4,0 @@ "description": "Promise version of mkdirp", |
@@ -25,22 +25,22 @@ # mkdirp-promise [![version][npm-version]][npm-url] [![License][npm-license]][license-url] | ||
### mkdirp(pattern [, options]) | ||
### mkdirp(dir, [, options]) | ||
*pattern*: `String` (mkdirp pattern) | ||
*pattern*: `String` | ||
*options*: `Object` or `String` | ||
Return: `Object` ([Promise]) | ||
When it finishes, it will be [*fulfilled*](http://promisesaplus.com/#point-26) with an `Array` of filenames as its first argument. | ||
When it finishes, it will be [*fulfilled*](http://promisesaplus.com/#point-26) with the first directory made that had to be created, if any. | ||
When it fails to read the files, it will be [*rejected*](http://promisesaplus.com/#point-30) with an error as its first argument. | ||
When it fails, it will be [*rejected*](http://promisesaplus.com/#point-30) with an error as its first argument. | ||
```js | ||
mkdirp('**/*') | ||
.then(function(contents) { | ||
contents; //=> ['lorem', 'ipsum', 'dolor'] | ||
}); | ||
mkdirp('/tmp/foo/bar/baz') | ||
.then(function (made) { | ||
console.log(made) //=> '/tmp/foo' | ||
}) | ||
mkdirp('{foo,bar.baz}.txt', { nobrace: true }) | ||
.then(function(contents) { | ||
contents; //=> [] | ||
}); | ||
.catch(function (err) { | ||
console.error(err) | ||
}) | ||
}) | ||
``` | ||
@@ -50,3 +50,3 @@ | ||
The option object will be directly passed to [mkdirp](https://github.com/substack/node-mkdirp#options). | ||
The option object will be directly passed to [mkdirp](https://github.com/substack/node-mkdirp#mkdirpdir-opts-cb). | ||
@@ -53,0 +53,0 @@ ## License |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4558