@achil/async-run-ended

1.1.0 • Public • Published

Check if your node.js program has finished the async code execution (async functions, promises, setTimeout etc), when Inter Process Communication (IPC) in Node.js keeps the connection between child and parent process, alive. It is not recommended to be used for production.

Installation

npm install @achil/async-run-ended

or

yarn add @achil/async-run-ended

Usage

Require the node module at the top of your code

const asyncEnd = require('@achil/async-run-ended');

and check at the end of your file or at a specific point of you code by using the module function check and a time interval as argument of it, for example at the following example, it checks every 50ms :

asyncEnd.check(50).then(function() {
  // Run your code at the end of the async code
});

/@achil/async-run-ended/

    Package Sidebar

    Install

    npm i @achil/async-run-ended

    Weekly Downloads

    0

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    2.64 kB

    Total Files

    5

    Last publish

    Collaborators

    • achil