carefree

1.0.1 • Public • Published

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>

Readme

Keywords

none

Package Sidebar

Install

npm i carefree

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

2.41 kB

Total Files

4

Last publish

Collaborators

  • liangxingchen