mirror of
https://github.com/joelwmale/webhook-action.git
synced 2024-12-03 20:54:30 +01:00
1ada95e04a
- Convert project to Javascript/Typescript - Allow custom headers to be passed in (optional) - Allow body to be optional
17 lines
252 B
JavaScript
17 lines
252 B
JavaScript
'use strict';
|
|
const fs = require('fs');
|
|
|
|
module.exports = fp => new Promise(resolve => {
|
|
fs.access(fp, err => {
|
|
resolve(!err);
|
|
});
|
|
});
|
|
|
|
module.exports.sync = fp => {
|
|
try {
|
|
fs.accessSync(fp);
|
|
return true;
|
|
} catch (err) {
|
|
return false;
|
|
}
|
|
};
|