Comparing version 2.1.0 to 2.2.0
38
index.js
@@ -5,3 +5,4 @@ "use strict"; | ||
const cursor = require('ansi')(process.stdout); | ||
const reader = require('line-by-line'); | ||
const Reader = require('line-by-line'); | ||
const supportsColor = require('supports-color'); | ||
@@ -105,23 +106,22 @@ let sleep = null; | ||
let println = function(line) { | ||
let colorizer = noColor; | ||
let colorizer = trueColor; | ||
if (supportsColor) { | ||
colorizer = fallbackColor; | ||
} | ||
if (process.platform === 'win32' || process.platform === 'darwin') { | ||
colorizer = fallbackColor; | ||
} | ||
if (supportsColor.has16m) { | ||
colorizer = trueColor; | ||
} | ||
if (options.colors === false) { | ||
colorizer = noColor; | ||
} | ||
cursor.show(); | ||
cursor.show(); | ||
if (options.animate) { | ||
cursor.hide(); | ||
printlnAnimated(colorizer, line); | ||
} else { | ||
printlnPlain(colorizer, line); | ||
} | ||
if (options.animate) { | ||
cursor.hide(); | ||
printlnAnimated(colorizer, line); | ||
} else { | ||
printlnPlain(colorizer, line); | ||
} | ||
process.stdout.write('\n'); | ||
process.stdout.write('\n'); | ||
}; | ||
@@ -146,6 +146,7 @@ | ||
let fileReader = new reader(file) | ||
let fileReader = new Reader(file) | ||
fileReader.on('line', function (line) { | ||
options.seed += 1; | ||
println(line); | ||
cursor.show(); | ||
}); | ||
@@ -161,2 +162,3 @@ }; | ||
println(line); | ||
cursor.show(); | ||
}); | ||
@@ -163,0 +165,0 @@ }; |
{ | ||
"name": "lolcatjs", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "The rainbow I tastes it", | ||
@@ -33,2 +33,3 @@ "main": "index.js", | ||
"multiline": "^1.0.2", | ||
"supports-color": "^4.2.0", | ||
"terminal-kit": "^0.26.0" | ||
@@ -35,0 +36,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
68634
238
7
+ Addedsupports-color@^4.2.0
+ Addedhas-flag@2.0.0(transitive)
+ Addedsupports-color@4.5.0(transitive)