mya/node_modules/rimraf/dist/esm/ignore-enoent.js
Fabio 82ccd023df
Some checks are pending
Build Android APK / build (push) Waiting to run
first commit
2026-01-21 15:08:14 +01:00

19 lines
No EOL
451 B
JavaScript

import { errorCode } from './error.js';
export const ignoreENOENT = async (p, rethrow) => p.catch(er => {
if (errorCode(er) === 'ENOENT') {
return;
}
throw rethrow ?? er;
});
export const ignoreENOENTSync = (fn, rethrow) => {
try {
return fn();
}
catch (er) {
if (errorCode(er) === 'ENOENT') {
return;
}
throw rethrow ?? er;
}
};
//# sourceMappingURL=ignore-enoent.js.map