Installations
npm install loading-cli
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
18.18.2
NPM Version
9.8.1
Score
89.8
Supply Chain
100
Quality
75.7
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
Download Statistics
Total Downloads
1,215,048
Last Day
2,342
Last Week
10,381
Last Month
53,857
Last Year
625,548
GitHub Statistics
54 Stars
51 Commits
6 Forks
4 Watching
2 Branches
2 Contributors
Bundle Size
4.94 kB
Minified
1.59 kB
Minified + Gzipped
Sponsor this package
Package Meta Information
Latest Version
1.1.2
Package Id
loading-cli@1.1.2
Unpacked Size
10.29 kB
Size
3.56 kB
File Count
6
NPM Version
9.8.1
Node Version
18.18.2
Publised On
27 Nov 2023
Total Downloads
Cumulative downloads
Total Downloads
1,215,048
Last day
-12.6%
2,342
Compared to previous day
Last week
-26.1%
10,381
Compared to previous week
Last month
6.3%
53,857
Compared to previous month
Last year
76.9%
625,548
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
loading-cli
Terminal loading effect.
![](https://user-images.githubusercontent.com/1680273/68320716-70f33600-00fb-11ea-8a78-47b82ab28240.gif)
Install
1$ npm install --save loading-cli
Usage
1const loading = require('loading-cli'); 2const load = loading("loading text!!").start() 3 4setTimeout(function(){ 5 load.color = 'yellow'; 6 load.text = ' Loading rainbows'; 7},2000) 8 9// stop 10setTimeout(function(){ 11 load.stop() 12},3000)
Custom text color colors-cli
1const color = require('colors-cli/toxic'); 2const loading = require('loading-cli'); 3 4const load = loading("loading text!!".blue).start(); 5// stop 6setTimeout(function(){ 7 load.stop() 8},3000)
API
loading([options|text])
options
1load({ 2 "text":"loading text!!", 3 "color":"yellow", 4 "interval":100, 5 "stream": process.stdout, 6 "frames":["◰", "◳", "◲", "◱"] 7})
text
Type: string Text to display after the spinner.
1loading("loading text!!")
color
Values:black
red
green
yellow
blue
magenta
cyan
white
gray
frames
1["◰", "◳", "◲", "◱"] 2["◐", "◓", "◑", "◒"] 3[".", "o", "O", "°", "O", "o", "."] 4["⊶", "⊷"] 5["ဝ", "၀"] 6["←", "↖", "↑", "↗", "→", "↘", "↓", "↙"] 7["🕐 ", "🕑 ", "🕒 ", "🕓 ", "🕔 ", "🕕 ", "🕖 ", "🕗 ", "🕘 ", "🕙 ", "🕚 "]
Instance
.start([text])
Start the spinner. Returns the instance.
.stop()
Stop and clear the spinner. Returns the instance.
.clear()
Clear the spinner. Returns the instance.
.succeed([text])
Stop the spinner, change it to a green ✔
and persist the current text, or text if provided. Returns the instance. See the GIF below.
.fail([text])
Stop the spinner, change it to a red ✖
and persist the current text, or text if provided. Returns the instance. See the GIF below.
.warn([text])
Stop the spinner, change it to a yellow ⚠
and persist the current text, or text if provided. Returns the instance.
.info([text])
Stop the spinner, change it to a blue ℹ
and persist the current text, or text if provided. Returns the instance.
.render()
Manually render a new frame. Returns the instance.
.frame()
Get a new frame.
1const loading = require('loading-cli'); 2const load = loading("loading text!!"); 3load.frame(["◰", "◳", "◲", "◱"]); 4load.start();
.text
Change the text.
.color
Change the spinner color.
Contributors
As always, thanks to our amazing contributors!
Made with contributors.
License
Licensed under the MIT License.
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
packaging workflow detected
Details
- Info: Project packages its releases by way of GitHub Actions.: .github/workflows/ci.yml:8
Reason
0 existing vulnerabilities detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/ci.yml:1
- Info: no jobLevel write permissions found
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
Found 0/27 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/jaywcjlove/loading-cli/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/jaywcjlove/loading-cli/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/jaywcjlove/loading-cli/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/jaywcjlove/loading-cli/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/jaywcjlove/loading-cli/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/jaywcjlove/loading-cli/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/jaywcjlove/loading-cli/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/jaywcjlove/loading-cli/ci.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:34
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 6 third-party GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 3 are checked with a SAST tool
Score
4.7
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More