Skip to content

A fully customizable loading animation package for your Console Logs.

Notifications You must be signed in to change notification settings

ReXulEc/consoleload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

consoleload (buggy now, try later)

NPM version NPM downloads GitHub Sponsors donate button

A fully customizable loading animation package for your Console Logs.

Installation

npm install consoleload

Usage

const cload = require("consoleload");

(async () => {
  let log = cload("Fetching user...", "basicspin");
  //await sleep(2000);
  // Code..
  let log2 = cload("Fetching data...", "basicspin");
  //await sleep(2000);
  // Code..
  log2.stop();
})();

Animations

Name Author Frames Spacing
basicspin(default) @ReXulEc ["-", "\", "|", "/"] default
plusminus @ReXulEc ["+", "-"] default
moon @ReXulEc ["🌑", "🌒", "🌓", "🌔", "🌕", "🌖", "🌗", "🌘"] default
weather @ReXulEc ["🌤️", "🌧️", "⛈️", "🌨️", "🌩️", "🌦️"] 2

Options

cload(text, animationName || customAnimation, customFps, customSpace)

You can use these options like this:

(async () => {
  const MyAnimation = {
    fps: 5,
    frames: [
      "/",
      "-",
      "\\",
      "-"
    ],
  }
  let log = cload("Loading with custom animation with 5fps and 5 space..", MyAnimation, null, 5);
  await sleep(5000);
  log.stop();
})();

Output:

Output

Contribute

You can create pr to add your own json. Just dont forget to add animation's name to types.

About

A fully customizable loading animation package for your Console Logs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published