@sintese/nodejs-async-handler
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

Node Async Handler

npm version Software License

Handler para funções asíncronas abstraindo o uso de chamadas try/catch

Instalando

Via npm

$ npm i @sintese/nodejs-async-handler

Usando

const handle = require('@sintese/nodejs-async-handler');

async function myAsyncCallback () {
    // my async code
}
 
const [error, data] = await handle(myAsyncCallback)

if(error) {
    // do something with it
}

console.log(data);

Change log

Modificações recentes são registradas no CHANGELOG

Contribuindo

Dúvidas, contribuições e sugestões são muito bem vidas.

Créditos

Licença

Esse pacote é disponibilizado sob a licença MIT.

Readme

Keywords

Package Sidebar

Install

npm i @sintese/nodejs-async-handler

Weekly Downloads

0

Version

1.0.6

License

MIT

Unpacked Size

5.11 kB

Total Files

7

Last publish

Collaborators

  • rafaelbeecker