site/node_modules/rimraf/dist/commonjs/ignore-enoent.js
2024-10-14 08:09:33 +02:00

21 lines
535 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ignoreENOENTSync = exports.ignoreENOENT = void 0;
const ignoreENOENT = async (p) => p.catch(er => {
if (er.code !== 'ENOENT') {
throw er;
}
});
exports.ignoreENOENT = ignoreENOENT;
const ignoreENOENTSync = (fn) => {
try {
return fn();
}
catch (er) {
if (er?.code !== 'ENOENT') {
throw er;
}
}
};
exports.ignoreENOENTSync = ignoreENOENTSync;
//# sourceMappingURL=ignore-enoent.js.map