1.2.1 â€ĸ Published 1 year ago

consoleload v1.2.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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

NameAuthorFramesSpacing
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:

Contribute

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