botbook/node_modules/rimraf/dist/esm/ignore-enoent.js
Rodrigo Rodriguez 6ae15fe3e5 Updated.
2024-09-04 13:13:15 -03:00

16 lines
No EOL
332 B
JavaScript

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