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

light-spinner

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

light-spinner - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

dist/index.d.ts

@@ -13,4 +13,2 @@ import { IOption } from './interface';

stop(): void;
show(): void;
private hide;
private clearLine;

@@ -17,0 +15,0 @@ private output;

25

dist/index.js

@@ -17,3 +17,2 @@ "use strict";

this.doing();
this.hide();
}

@@ -23,15 +22,15 @@ stop() {

this.clearLine();
this.show();
}
show() {
process.stdout.write('\u001b[?25h');
}
hide() {
process.stdout.write('\u001b[?25l');
}
clearLine() {
const clearChar = '\u001b[2K';
process.stdout.write(clearChar);
const moveCursor = `\u001b[${Buffer.byteLength(this.message || '')}D`;
process.stdout.write(moveCursor);
const messageLine = (this.message || '').split('\n');
while (messageLine.length) {
const message = messageLine.pop();
const clearChar = '\u001b[2K';
const moveCursor = `\u001b[${Buffer.byteLength(message)}D`;
process.stdout.write(clearChar);
process.stdout.write(moveCursor);
if (messageLine.length) {
process.stdout.write('\u001b[1F');
}
}
}

@@ -43,3 +42,3 @@ output(message) {

doing() {
const message = `${this.spinners[this.index++]} ${this.text || ''}`;
const message = `${this.spinners[this.index++]} ${this.text || ''}${this.isWin ? '' : '\n'}`;
this.clearLine();

@@ -46,0 +45,0 @@ this.output(message);

{
"name": "light-spinner",
"version": "1.0.1",
"version": "1.0.2",
"description": "light-spinner",

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

@@ -20,7 +20,8 @@ <p align="center">

<br />
<br/>
<br />
<img src="https://raw.githubusercontent.com/echosoar/light-spinner/master/spin.gif" />
</p>
![effect](https://raw.githubusercontent.com/echosoar/light-spinner/master/light-spinner.gif)
## Install

@@ -27,0 +28,0 @@ ```shell

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