🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

ph-terminal-spinner

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ph-terminal-spinner

命令行工具简单的加载提示工具

0.0.4
latest
npm
Version published
Weekly downloads
295
16.14%
Maintainers
1
Weekly downloads
 
Created
Source

ph-terminal-spinner

命令行工具简单的加载提示信息,只提供了一些简单的功能,需要更多强大的功能,请参考使用:ora

安装

npm install ph-terminal-spinner

使用

const Spinner = require('./index')

let spinner = Spinner('数据加载中')
spinner.start()
setTimeout(() => {
  spinner.succeed('数据加载成功')
}, 1500)

API

  • start(text: string)
    开启加载动画。

  • succeed(text: string)
    加载成功后显示的文本信息

  • fail(text: string)
    加载失败显示的文本信息

  • stop()
    停止加载动画

Keywords

nodejs

FAQs

Package last updated on 04 Jun 2021

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