ProductPromotion
Logo

Node.JS

made by https://0x3d.site

GitHub - codekirei/node-multispinner: Multiple, simultaneous, individually controllable spinners for concurrent tasks in Node.js CLI programs
Multiple, simultaneous, individually controllable spinners for concurrent tasks in Node.js CLI programs - codekirei/node-multispinner
Visit Site

GitHub - codekirei/node-multispinner: Multiple, simultaneous, individually controllable spinners for concurrent tasks in Node.js CLI programs

GitHub - codekirei/node-multispinner: Multiple, simultaneous, individually controllable spinners for concurrent tasks in Node.js CLI programs

node-multispinner

Build Status Coverage Status

About | Installation | API | Examples | Attribution | License

About

node-multispinner is a Node.js module for managing multiple progress indicators (spinners) in CLI apps. This module is especially useful for apps that benefit from simultaneous async task execution (e.g. with Promise.all[]), as it enables live updating individual spinners, in any order, while other spinners continue spinning. Node.js 4.0 or newer is required.

demo-gif

Installation

Install and require as a standard Node module.

Install

  $ npm install --save multispinner

Require

  var Multispinner = require('multispinner')

API

Full documentation available here.

Examples

The examples discussed below can be found here. Run them in a terminal with node:

$ node <example>

Example: events.js

Creates four spinners from an array, then completes them in succession with staggered setTimeout functions. Responds to the success and err completion events.

Example: customAnimation.js

Creates a custom spinner animation with the frames option.

Example: randomInfiniteLoop.js

Creates three to seven spinners with random lorem text and completes them randomly in less than five seconds in an infinite loop. Stubs out the logUpdate.done() function to overwrite the previous output with every loop.

It's kind of mesmerising.

Example: cli-with-promises

A CLI application that reads URLs and parses HTML into text to display in a terminal. Uses meow for CLI support, html-to-text for parsing, and axios for Promise-based HTTP requests. Creates spinners for each URL, and uses Promise.all() to execute the GET requests in parallel.

There are certainly edge cases that this example doesn't account for; it is not meant to be a "real" application. Despite that, the code should be illustrative of how node-multispinner could potentially be used in a real application.

This example is unique in that it requires modules not used in node-multispinner. Before running it, cd into its directory and install the additional requirements from its package.json with npm install.

Attribution

Thanks to sindresorhus for his log-update module, which was a major inspiration for and is used extensively in this module. Log-update is MIT licensed.

License

MIT

Articles
to learn more about the nodejs concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about NodeJS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory