simple-spinner
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -5,5 +5,5 @@ { | ||
"keywords": ["simple", "spinner", "indicator"], | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"licence": "MIT", | ||
"author": "Ian McCall <imccall@da-puck.com> (http://www.da-puck.com/)", | ||
"author": "Ian McCall <imccall@da-puck.com> (http://www.ianmccall.codes/)", | ||
"main": "./spinner", | ||
@@ -10,0 +10,0 @@ "repository": { |
@@ -5,3 +5,3 @@ /*********** | ||
var spinner = (function() { | ||
var util = require('util'); | ||
//var util = require('util'); | ||
var sequence = ["|","/","-","\\"]; //[".", "o", "0", "@", "*"]; | ||
@@ -14,7 +14,10 @@ var index = 0; | ||
index = 0; | ||
util.print(sequence[index]); | ||
//util.print(sequence[index]); | ||
process.stdout.write(sequence[index]); | ||
timer = setInterval(function() { | ||
util.print(sequence[index].replace(/./g,"\r")); | ||
//util.print(sequence[index].replace(/./g,"\r")); | ||
process.stdout.write(sequence[index].replace(/./g,"\r")); | ||
index = (index < sequence.length - 1) ? index + 1 : 0; | ||
util.print(sequence[index]); | ||
//util.print(sequence[index]); | ||
process.stdout.write(sequence[index]); | ||
},inv); | ||
@@ -25,3 +28,4 @@ } | ||
clearInterval(timer); | ||
util.print(sequence[index].replace(/./g,"\r")); | ||
//util.print(sequence[index].replace(/./g,"\r")); | ||
process.stdout.write(sequence[index].replace(/./g,"\r")); | ||
} | ||
@@ -28,0 +32,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3667
54