New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-console-loading

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-console-loading

An util function to show a simple loading animation on a terminal.

latest
Source
npmnpm
Version
2.0.1
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

node-console-loading

An util function to show a simple loading animation on a terminal.

Tested Platforms

  • Windows

Installation

yarn add node-console-loading

or

npm install node-console-loading

Usage

import createLoader from "node-console-loading";

//Creating a loading animation
createLoader(yourPromise, "Resolved! :)", "Rejected! :(");

//Use case using axios
import axios from "axios";

const requestPromise = axios.get("https://example.com/");
createLoader(requestPromise, "Resolved! :)", "Rejected! :(");

//Using your own custom animation
const frames = [
    ".   ",
    " .  ",
    "  . ",
    "   .",
    "  . ",
    " .  ",
]

createLoader(yourPromise, "Resolved! :)", "Rejected! :(", frames);

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Keywords

console

FAQs

Package last updated on 16 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts