site/node_modules/rimraf/dist/esm/ignore-enoent.js

16 lines
332 B
JavaScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
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