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.6.0 to 1.0.0

4

index.d.ts

@@ -12,4 +12,4 @@ interface Options {

error(opts?: { text?: string; mark?: string }): Spinner
stop(opts?: { text?: string; mark?: string }): Spinner
start(opts?: { text?: string, color?: string }): Spinner
stop(opts?: { text?: string; mark?: string; color?: string }): Spinner
start(opts?: { text?: string; color?: string }): Spinner
update(opts?: Options): Spinner

@@ -16,0 +16,0 @@ reset(): Spinner

@@ -18,3 +18,3 @@ const pico = require('picocolors')

stream = opts.stream || process.stderr,
frames = opts.frames || symbols.frames,
frames = opts.frames && opts.frames.length ? opts.frames : symbols.frames,
color = opts.color || 'yellow',

@@ -67,5 +67,10 @@ lines = 0,

text = opts.text || text
frames = opts.frames || frames
frames = opts.frames && opts.frames.length ? opts.frames : frames
interval = opts.interval || interval
color = opts.color || color
if (frames.length - 1 < current) {
current = 0
}
return spinner

@@ -87,4 +92,5 @@ },

let mark = pico[color](frames[current])
spinner.write(`${opts.mark || mark} ${opts.text || text}\n`, true)
let mark = pico[opts.color || color](frames[current])
let optsMark = opts.mark && opts.color ? pico[opts.color](opts.mark) : opts.mark
spinner.write(`${optsMark || mark} ${opts.text || text}\n`, true)

@@ -91,0 +97,0 @@ return isTTY ? spinner.write(`\x1b[?25h`) : spinner

{
"name": "nanospinner",
"version": "0.6.0",
"version": "1.0.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