How To Install node-when on Ubuntu 18.04

In this tutorial we learn how to install node-when on Ubuntu 18.04. node-when is Async tools and when() implementation for Node.js

Introduction

In this tutorial we learn how to install node-when on Ubuntu 18.04.

What is node-when

node-when is:

A lightweight Promises/A+ and when() implementation, plus other async tools.

A when() function is responsible of triggering actions depending on the result of executing asynchronous actions, with submethods to check for any or all results, and handling exceptions.

Promises/A+ is a programming interface for asynchronous operations.

Node.js is an event-based server-side JavaScript engine.

There are three methods to install node-when on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install node-when Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install node-when using apt-get by running the following command:

sudo apt-get -y install node-when

Install node-when Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install node-when using apt by running the following command:

sudo apt -y install node-when

Install node-when Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install node-when using aptitude by running the following command:

sudo aptitude -y install node-when

How To Uninstall node-when on Ubuntu 18.04

To uninstall only the node-when package we can use the following command:

sudo apt-get remove node-when

Uninstall node-when And Its Dependencies

To uninstall node-when and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove node-when

Remove node-when Configurations and Data

To remove node-when configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge node-when

Remove node-when configuration, data, and all of its dependencies

We can use the following command to remove node-when configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge node-when

References

Summary

In this tutorial we learn how to install node-when package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.