1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-03 12:50:04 +02:00

update dependencies

This commit is contained in:
s2
2018-10-10 15:11:12 +02:00
parent da4083f574
commit 5c55c54b71
90877 changed files with 339776 additions and 33677 deletions

View File

@@ -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;

View File

@@ -1,34 +1,28 @@
{
"_args": [
[
"path-exists@2.1.0",
"E:\\projects\\p\\gitlit\\app"
]
],
"_development": true,
"_from": "path-exists@2.1.0",
"_id": "path-exists@2.1.0",
"_from": "path-exists@^3.0.0",
"_id": "path-exists@3.0.0",
"_inBundle": false,
"_integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
"_integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
"_location": "/path-exists",
"_phantomChildren": {},
"_requested": {
"type": "version",
"type": "range",
"registry": true,
"raw": "path-exists@2.1.0",
"raw": "path-exists@^3.0.0",
"name": "path-exists",
"escapedName": "path-exists",
"rawSpec": "2.1.0",
"rawSpec": "^3.0.0",
"saveSpec": null,
"fetchSpec": "2.1.0"
"fetchSpec": "^3.0.0"
},
"_requiredBy": [
"/electron-download",
"/find-up"
"/locate-path"
],
"_resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
"_spec": "2.1.0",
"_where": "E:\\projects\\p\\gitlit\\app",
"_resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
"_shasum": "ce0ebeaa5f78cb18925ea7d810d7b59b010fd515",
"_spec": "path-exists@^3.0.0",
"_where": "E:\\projects\\p\\gitlit\\app\\node_modules\\electron-download",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -37,16 +31,15 @@
"bugs": {
"url": "https://github.com/sindresorhus/path-exists/issues"
},
"dependencies": {
"pinkie-promise": "^2.0.0"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Check if a path exists",
"devDependencies": {
"ava": "*",
"xo": "*"
},
"engines": {
"node": ">=0.10.0"
"node": ">=4"
},
"files": [
"index.js"
@@ -73,5 +66,8 @@
"scripts": {
"test": "xo && ava"
},
"version": "2.1.0"
"version": "3.0.0",
"xo": {
"esnext": true
}
}

View File

@@ -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)