This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

spinify
TypeScript icon, indicating that this package has built-in type declarations

2.6.0 • Public • Published

Spinify

Spinify is a simple and customizable terminal spinner library for Node.js.

Structure

└── app.js
└── core.js
└── CustomSpinify.js
└── index.js
└── LICENSE
└── package-lock.json
└── package.json
└── README.md

Installation

You can install Spinify using npm:

bash npm install spinify

Usage

  1. Import the CustomSpinner class in your Node.js project:

    const { CustomSpinner } = require("spinify");
  2. Create a new spinner instance, providing the desired style and text:

const Spinify = new CustomSpinner("dots", "Loading...");

You can choose from various spinner styles such as 'dots', 'arrows', 'lines', etc.

  1. Start the spinner:
Spinify.start();
  1. Simulate a time-consuming task. For example, use setTimeout:
setTimeout(() => {
  Spinify.stop();
}, 5000);

Adjust the duration as needed.

Spinify Styles

Spinify supports various spinner styles. You can customize the spinner style by providing the desired style when creating the CustomSpinner instance.

const Spinify = new CustomSpinner("arrow", "Processing...");

Available spinner styles include 'dots', 'arrow', 'line', 'step', and more.

Example

Here's a simple example of using Spinify to display a spinner while simulating a time-consuming task:

const { CustomSpinner } = require("spinify");

const Snipify = new CustomSpinner("dots", "Loading...");
Snipify.start();

// Simulate a time-consuming task
setTimeout(() => {
  Snipify.stop();
}, 5000);

Feel free to explore different spinner styles and integrate Spinify into your projects for a delightful terminal experience.

Spinify Themes

export const spinify = {
  spinify: {
    frames: ["-/", "/-", "/", "---", "---", "-/"],
    interval: 80,
  },
  spet: {
    frames: ["<", ">", "<", ">", "*", "<", ">"],
    interval: 100,
  },
  dots: {
    frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"],
    interval: 80,
  },
  lines: {
    frames: ["-", "\\", "|", "/"],
    interval: 100,
  },
  arrows: {
    frames: ["←", "↖", "↑", "↗", "→", "↘", "↓", "↙"],
    interval: 120,
  },
  custom: {
    frames: ["⊙", "⋆", "✸", "❉", "✦", "✿", "❀"],
    interval: 100,
  },
  asterisk: {
    frames: ["***", "**", "***", "**", "***", "**"],
    interval: 120,
  },
};
  • Select your spinify theme favorite

License

This project is licensed under the MIT License - see the LICENSE file for details.


Enjoy spinning your tasks with Spinify! If you encounter any issues or have suggestions, feel free to contribute or report a bug.

Readme

Keywords

Package Sidebar

Install

npm i spinify

Weekly Downloads

5

Version

2.6.0

License

ISC

Unpacked Size

8.93 kB

Total Files

11

Last publish

Collaborators

  • watercubz