thanos-js-tutorial
Javascript Node.js

Thanos.js Tutorial – Restore Balance to your Project

The first time I saw Thanos.js, I was thinking, they must be joking. After some testing, they are not. This Node.js app is actually disintegrate your project at the snap command. Let’s see how it works!

Installation

If you search google for Thanos.js there are 2 versions. The first one is on npm and that’s what we’re going to test in this video. Another one is apparently just a parody site. I even tried their install command and of course it didn’t work.

thanos-js-tutorial-1

Now Thanos.js is a node.js application and if haven’t already, you’ll need to install node.js first.

Let’s start the test by installing thanos.js with npm command. The -g option is to install it globally and let us use it anywhere.

npm install thanos-js -g

And here is our test subject. A folder with stock images that I have renamed all of them sequentially so we can easily spot which files are deleted after we snapped the finger.

thanos-js-tutorial-2

Usage

Now let’s change the directory to the folder you want to “restore balance” and type in the snap command. There will be a warning about half of your files will be deleted and this is one time confirmation only.

thanos-js snap-fingers

Now not sure if it’s just me, there is an error after the confirmation. Probably Thanos’ arrival has disrupted my PC. Anyway, let’s snap the fingers again.

thanos-js-tutorial-3

Well, he said there is no point snapping fingers without the infinity gauntlet. Let’s give him one by adding with infinity-gauntlet glove option.

thanos-js snap-fingers --with-infinity-gauntlet-glove

thanos-js-tutorial-4

thanos-js-tutorial-5

It appears that there were serious half of my files were really deleted.

thanos-js-tutorial-6

And that’s Thanos.js I believe it’s not completely useless after all. I still see people asking on the forum on how to randomly delete files. And application of Thanos.js could probably fit their use.

thanos-js-tutorial-7

And that’s all for this tutorial. Hope you guy enjoy. If you want to see more development tips and tutorial, like our Facebook and subscribe our Youtube Channel to stay connected. Thanks for visiting 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

error: