Updating NPM dependencies
This commit is contained in:
16
node_modules/path-exists/readme.md
generated
vendored
16
node_modules/path-exists/readme.md
generated
vendored
@@ -2,7 +2,9 @@
|
||||
|
||||
> Check if a path exists
|
||||
|
||||
Because [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), but there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it.
|
||||
NOTE: `fs.existsSync` has been un-deprecated in Node.js since 6.8.0. If you only need to check synchronously, this module is not needed.
|
||||
|
||||
While [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it.
|
||||
|
||||
Never use this before handling a file though:
|
||||
|
||||
@@ -12,7 +14,7 @@ Never use this before handling a file though:
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save path-exists
|
||||
$ npm install path-exists
|
||||
```
|
||||
|
||||
|
||||
@@ -22,10 +24,10 @@ $ npm install --save path-exists
|
||||
// foo.js
|
||||
const pathExists = require('path-exists');
|
||||
|
||||
pathExists('foo.js').then(exists => {
|
||||
console.log(exists);
|
||||
(async () => {
|
||||
console.log(await pathExists('foo.js'));
|
||||
//=> true
|
||||
});
|
||||
})();
|
||||
```
|
||||
|
||||
|
||||
@@ -33,11 +35,11 @@ pathExists('foo.js').then(exists => {
|
||||
|
||||
### pathExists(path)
|
||||
|
||||
Returns a promise for a boolean of whether the path exists.
|
||||
Returns a `Promise<boolean>` of whether the path exists.
|
||||
|
||||
### pathExists.sync(path)
|
||||
|
||||
Returns a boolean of whether the path exists.
|
||||
Returns a `boolean` of whether the path exists.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
Reference in New Issue
Block a user