mirror of
https://github.com/xfarrow/blink
synced 2025-06-27 09:03:02 +02:00
Change endpoint from persons to people
This commit is contained in:
23
backend/apis/nodejs/node_modules/path-exists/index.js
generated
vendored
Normal file
23
backend/apis/nodejs/node_modules/path-exists/index.js
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
const fs = require('fs');
|
||||
const {promisify} = require('util');
|
||||
|
||||
const pAccess = promisify(fs.access);
|
||||
|
||||
module.exports = async path => {
|
||||
try {
|
||||
await pAccess(path);
|
||||
return true;
|
||||
} catch (_) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports.sync = path => {
|
||||
try {
|
||||
fs.accessSync(path);
|
||||
return true;
|
||||
} catch (_) {
|
||||
return false;
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user