Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nanospinner

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nanospinner - npm Package Compare versions

Comparing version 0.3.2 to 0.4.0

13

index.d.ts
interface Options {
text?: string
stream?: NodeJS.WriteStream
frames?: string[]
interval?: number
frames?: string[]
text?: string
}
interface Spinner {
success(opts?: { text?: string; mark?: string }): Spinner
error(opts?: { text?: string; mark?: string }): Spinner
stop(opts?: { text?: string; mark?: string }): Spinner
start(opts?: { text?: string }): Spinner
update(opts?: Options): Spinner
reset(): Spinner
clear(): Spinner
spin(): Spinner
stop(opts?: { text?: string; mark?: string }): Spinner
start(opts?: { text?: string }): Spinner
error(opts?: { text?: string; mark?: string }): Spinner
success(opts?: { text?: string; mark?: string }): Spinner
}
export function createSpinner(text?: string, opts?: Options): Spinner

@@ -26,10 +26,16 @@ const { green, red, yellow } = require('picocolors')

clear() {
spinner.write('\x1b[1G')
for (let i = 0; i < lines; i++) {
i > 0 && spinner.write('\x1b[1A')
spinner.write('\x1b[2K\x1b[1G')
}
lines = 0
return spinner
},
write(str, clear = false) {
if (clear && isTTY) {
spinner.write('\x1b[1G')
for (let i = 0; i < lines; i++) {
i > 0 && spinner.write('\x1b[1A')
spinner.write('\x1b[2K\x1b[1G')
}
lines = 0
spinner.clear()
}

@@ -36,0 +42,0 @@

{
"name": "nanospinner",
"version": "0.3.2",
"version": "0.4.0",
"description": "The simplest and tiniest terminal spinner for Node.js",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc