All Projects β†’ usmanyunusov β†’ nanospinner

usmanyunusov / nanospinner

Licence: ISC license
πŸŒ€ The simplest and tiniest terminal spinner for Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to nanospinner

react-awesome-loaders
πŸš€ High quality, super responsive and completely customisable Loading Animations to insert into your website with single line of code.
Stars: ✭ 146 (+35.19%)
Mutual labels:  spinner, spinners
spinnies
Node.js module to create and manage multiple spinners in command-line interface programs
Stars: ✭ 111 (+2.78%)
Mutual labels:  spinner, spinners
Progress bar
Command-line progress bars and spinners for Elixir.
Stars: ✭ 281 (+160.19%)
Mutual labels:  spinner, spinners
spinner
A simple, configurable, multi-platform spinner
Stars: ✭ 42 (-61.11%)
Mutual labels:  spinner, spinners
React Spinners Kit
A collection of loading spinners with React.js
Stars: ✭ 158 (+46.3%)
Mutual labels:  spinner, spinners
Whirl
CSS loading animations with minimal effort!
Stars: ✭ 774 (+616.67%)
Mutual labels:  spinner, spinners
Aframe Preloader Component
A preloading bar that automatically displays while scene assets load.
Stars: ✭ 27 (-75%)
Mutual labels:  spinner, spinners
Ng Spin Kit
SpinKit (http://tobiasahlin.com/spinkit/) spinners for Angular
Stars: ✭ 90 (-16.67%)
Mutual labels:  spinner, spinners
spinners-angular
Lightweight SVG/CSS spinners for Angular
Stars: ✭ 21 (-80.56%)
Mutual labels:  spinner, spinners
Materialspinner
Implementation of a Material Spinner for Android with TextInputLayout functionalities
Stars: ✭ 107 (-0.93%)
Mutual labels:  spinner, spinners
Spinners React
Lightweight SVG/CSS spinners for React
Stars: ✭ 254 (+135.19%)
Mutual labels:  spinner, spinners
Alive Progress
A new kind of Progress Bar, with real-time throughput, ETA, and very cool animations!
Stars: ✭ 2,940 (+2622.22%)
Mutual labels:  spinner, spinners
ZXLoadingView
πŸ•ZXLoadingView is an iOS progress-activity
Stars: ✭ 14 (-87.04%)
Mutual labels:  spinner, spinners
loading
Laravel package to add loading indicator to pages while page is loading.
Stars: ✭ 38 (-64.81%)
Mutual labels:  spinner
loading-indicator
🚦 Simple and customizable command line loading indicator
Stars: ✭ 18 (-83.33%)
Mutual labels:  spinner
react-native-animated-loader
🍭 A React Native Loader Component which uses Airbnb's Lottie for beautiful loader animations.
Stars: ✭ 165 (+52.78%)
Mutual labels:  spinners
lsp spinner.nvim
neovim plugin to retrieve the name of the running LSP client(s) and display a spinner when there are wip job
Stars: ✭ 23 (-78.7%)
Mutual labels:  spinner
InstagramActivityIndicator
Activity Indicator similar to Instagram's
Stars: ✭ 49 (-54.63%)
Mutual labels:  spinner
clappr-plugins
Main plugins for the Clappr project
Stars: ✭ 22 (-79.63%)
Mutual labels:  spinner
Indian-States-and-Cities-Android
Offline Android App to illustrate Auto Complete Indian cities and states text views
Stars: ✭ 19 (-82.41%)
Mutual labels:  spinner

Nano Spinner

The simplest and tiniest terminal spinner for Node.js

import { createSpinner } from 'nanospinner'

const spinner = createSpinner('Run test').start()

setTimeout(() => {
  spinner.success()
}, 1000)
  • Only single dependency (picocolors).
  • It 45 times smaller than ora.
  • Support both CJS and ESM projects.
  • TypeScript type declarations included.

Motivation

With nanospinner we are trying to draw attention to the node_modules size problem and promote performance-first culture.

Benchmarks

The space in node_modules including sub-dependencies:

$ node ./test/size.js
Data from packagephobia.com
  ora           597 kB
+ nanospinner    13 kB

API

.spin()

Looping over spin method will animate a given spinner.

setInterval(() => {
  spinner.spin()
}, 25)
.start(options?)

In order to start the spinner call start. This will perform drawing the spinning animation

spinner.start()
spinner.start({ text: 'Start', color: 'yellow' })
.stop(options?)

In order to stop the spinner call stop. This will finish drawing the spinning animation and return to new line.

spinner.stop()
spinner.stop({ text: 'Done!', mark: ':O', color: 'magenta' })
.success(options?)

Use success call to stop the spinning animation and replace the spinning symbol with check mark character to indicate successful completion.

spinner.success()
spinner.success({ text: 'Successful!', mark: ':)' })
.warn(options?)

Use warn call to stop the spinning animation and replace the spinning symbol with warn mark character to indicate warning completion.

spinner.warn()
spinner.warn({ text: 'Warning!', mark: ':|' })
.error(options?)

Use error call to stop the spinning animation and replace the spinning symbol with cross character to indicate error completion.

spinner.error()
spinner.error({ text: 'Error!', mark: ':(' })
.update(options?)

Use update call to dynamically change

spinner.update({
  text: 'Run test',
  color: 'white',
  stream: process.stdout,
  frames: ['.', 'o', '0', '@', '*'],
  interval: 100,
})
.clear()

Clears the spinner`s output

spinner.clear()
.reset()

In order to reset the spinner to its initial frame do:

spinner.reset()

Roadmap

  • Multi spinners
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].