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

chalk-animation

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chalk-animation - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

.idea/chalk-animation.iml

2

cli.js

@@ -8,2 +8,3 @@ #!/usr/bin/env node

console.error('\nExample\n $ chalk-animation rainbow Hello world!');
// eslint-disable-next-line no-process-exit
process.exit(2);

@@ -14,2 +15,3 @@ }

console.error('error: unknown animation name:', process.argv[2]);
// eslint-disable-next-line no-process-exit
process.exit(1);

@@ -16,0 +18,0 @@ }

@@ -127,2 +127,3 @@ 'use strict';

currentAnimation = {
text: str,
stopped: false,

@@ -132,3 +133,3 @@ frame: 0,

const self = this;
log('\u001B[1F\u001B[G\u001B[2K' + effect(str, this.frame));
log('\u001B[1F\u001B[G\u001B[2K' + effect(this.text, this.frame));
setTimeout(() => {

@@ -141,2 +142,5 @@ self.frame++;

},
replace(str) {
this.text = str;
},
stop() {

@@ -143,0 +147,0 @@ this.stopped = true;

2

package.json
{
"name": "chalk-animation",
"description": "Colorful animations in terminal stdout",
"version": "1.1.1",
"version": "1.2.0",
"author": "Boris K",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/bokub/chalk-animation/issues",

@@ -37,3 +37,3 @@ # chalk-animation

You can stop and restart an animation
You can stop and restart an animation with `stop()` and `start()`

@@ -69,3 +69,15 @@ ```javascript

Change the animated text seamlessly with `replace()`
```javascript
let str = 'Loading...';
const rainbow = chalkAnimation.rainbow(str);
// Add a new dot every second
setInterval(() => {
str += '.';
rainbow.replace(str);
}, 1000);
```
## CLI mode

@@ -72,0 +84,0 @@

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