summaryrefslogtreecommitdiff
path: root/chromium/third_party/devtools-frontend/src/node_modules/path-exists
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-06 12:48:11 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:33:43 +0000
commit7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (patch)
treefa14ba0ca8d2683ba2efdabd246dc9b18a1229c6 /chromium/third_party/devtools-frontend/src/node_modules/path-exists
parent79b4f909db1049fca459c07cca55af56a9b54fe3 (diff)
downloadqtwebengine-chromium-7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3.tar.gz
BASELINE: Update Chromium to 84.0.4147.141
Change-Id: Ib85eb4cfa1cbe2b2b81e5022c8cad5c493969535 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/devtools-frontend/src/node_modules/path-exists')
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/path-exists/index.js21
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/path-exists/package.json10
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/path-exists/readme.md13
3 files changed, 21 insertions, 23 deletions
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/path-exists/index.js b/chromium/third_party/devtools-frontend/src/node_modules/path-exists/index.js
index a7e680a7635..16ae60acb18 100644
--- a/chromium/third_party/devtools-frontend/src/node_modules/path-exists/index.js
+++ b/chromium/third_party/devtools-frontend/src/node_modules/path-exists/index.js
@@ -1,22 +1,15 @@
'use strict';
-var fs = require('fs');
-var Promise = require('pinkie-promise');
+const fs = require('fs');
-module.exports = function (fp) {
- var fn = typeof fs.access === 'function' ? fs.access : fs.stat;
-
- return new Promise(function (resolve) {
- fn(fp, function (err) {
- resolve(!err);
- });
+module.exports = fp => new Promise(resolve => {
+ fs.access(fp, err => {
+ resolve(!err);
});
-};
-
-module.exports.sync = function (fp) {
- var fn = typeof fs.accessSync === 'function' ? fs.accessSync : fs.statSync;
+});
+module.exports.sync = fp => {
try {
- fn(fp);
+ fs.accessSync(fp);
return true;
} catch (err) {
return false;
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/path-exists/package.json b/chromium/third_party/devtools-frontend/src/node_modules/path-exists/package.json
index a7c6bbc8ea0..d688b2c00d1 100644
--- a/chromium/third_party/devtools-frontend/src/node_modules/path-exists/package.json
+++ b/chromium/third_party/devtools-frontend/src/node_modules/path-exists/package.json
@@ -4,16 +4,13 @@
"name": "Sindre Sorhus",
"url": "sindresorhus.com"
},
- "dependencies": {
- "pinkie-promise": "^2.0.0"
- },
"description": "Check if a path exists",
"devDependencies": {
"ava": "*",
"xo": "*"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=4"
},
"files": [
"index.js"
@@ -36,5 +33,8 @@
"scripts": {
"test": "xo && ava"
},
- "version": "2.1.0"
+ "version": "3.0.0",
+ "xo": {
+ "esnext": true
+ }
} \ No newline at end of file
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/path-exists/readme.md b/chromium/third_party/devtools-frontend/src/node_modules/path-exists/readme.md
index 8fbcd68df1c..1b65fa705d9 100644
--- a/chromium/third_party/devtools-frontend/src/node_modules/path-exists/readme.md
+++ b/chromium/third_party/devtools-frontend/src/node_modules/path-exists/readme.md
@@ -20,9 +20,9 @@ $ npm install --save path-exists
```js
// foo.js
-var pathExists = require('path-exists');
+const pathExists = require('path-exists');
-pathExists('foo.js').then(function (exists) {
+pathExists('foo.js').then(exists => {
console.log(exists);
//=> true
});
@@ -33,13 +33,18 @@ pathExists('foo.js').then(function (exists) {
### pathExists(path)
-Returns a promise that resolves to a boolean of whether the path exists.
+Returns a promise for a boolean of whether the path exists.
### pathExists.sync(path)
Returns a boolean of whether the path exists.
+## Related
+
+- [path-exists-cli](https://github.com/sindresorhus/path-exists-cli) - CLI for this module
+
+
## License
-MIT © [Sindre Sorhus](http://sindresorhus.com)
+MIT © [Sindre Sorhus](https://sindresorhus.com)