carefree
v1.0.1
Published
Call a promise or callback function without care any exception
Downloads
4
Readme
carefree
Call a promise or callback function without care any exception
const carefree = require('carefree');
(async ()=> {
await carefree(async()=>{ throw new Error()});
console.log('Do not care the error above. Just run!');
})();
API
carefree(fn: AsyncFunction | Function | Promise): Promise<Error|null>