jbcarpanelli / spinnies

Node.js module to create and manage multiple spinners in command-line interface programs
MIT License
147 stars 32 forks source link

Add ability to remove a spinner from the spinners list #5

Open jbcarpanelli opened 5 years ago

jbcarpanelli commented 5 years ago

The idea is to implement a new method called remove that receives a spinner reference name as argument and removes that spinner from the list, and thus should not be printed again in the terminal If no reference is given, the method call does nothing.

Example usage:

const spinnies = new Spinnies();
spinnies.add('spinner-1');
spinnies.add('spinner-2');
spinnies.add('spinner-3');
setTimeout(() => {
  spinnies.remove('spinner-2');
}, 3000); // => should remove the second spinner and not print it again. 
SweetMNM commented 4 years ago

I implemented this feature in my fork. I'm working on more features, then i will open a PR.

jbcarpanelli commented 4 years ago

Hey @SweetMNM! Thanks for tackling this! Looking forward to reviewing that PR :slightly_smiling_face:

jbcarpanelli commented 4 years ago

Hey @SweetMNM, I noticed you have been improving spinnies a lot in your fork! Do you plan to create a PR soon?

SweetMNM commented 4 years ago

Yes, I just want to finish implementing custom statuses, hide and unhide spinners, write some more tests and maybe some other features before I open the PR..