Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 342 Bytes

README.md

File metadata and controls

20 lines (13 loc) · 342 Bytes

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>