Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "gauge", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A terminal based horizontal guage", | ||
@@ -5,0 +5,0 @@ "main": "progress-bar.js", |
"use strict" | ||
var hasUnicode = require("has-unicode") | ||
var ansi = require("ansi") | ||
var stream = require("stream") | ||
@@ -72,3 +71,3 @@ var ProgressBar = module.exports = function (options, cursor) { | ||
var repeat = function (str, count) { | ||
var out = '' | ||
var out = "" | ||
for (var ii=0; ii<count; ++ii) out += str | ||
@@ -140,3 +139,3 @@ return out | ||
? theme.spinner.substr(values.spinner % theme.spinner.length,1) | ||
: ""; | ||
: "" | ||
@@ -146,7 +145,7 @@ var output = {prebar: "", postbar: ""} | ||
template.forEach(function(T) { | ||
if (typeof T == "string") { | ||
if (typeof T === "string") { | ||
output[status] += T | ||
return | ||
} | ||
if (T.type == "completionbar") { | ||
if (T.type === "completionbar") { | ||
status = "postbar" | ||
@@ -157,6 +156,6 @@ return | ||
var value = values[T.type] | ||
if (value == null || value=="") return | ||
if (value == null || value === "") return | ||
var sofar = output[status].length | ||
var lastChar = sofar ? output[status][sofar-1] : null | ||
if (T.separated && sofar && lastChar != " ") { | ||
if (T.separated && sofar && lastChar !== " ") { | ||
output[status] += " " | ||
@@ -170,3 +169,3 @@ } | ||
var bar = "" | ||
if (status == "postbar") { | ||
if (status === "postbar") { | ||
var nonBarLen = output.prebar.length + output.postbar.length | ||
@@ -173,0 +172,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
40383
291