+28
| # immolate | ||
| Set your terminal ablaze 🔥 | ||
| ``` | ||
| npm install -g immolate | ||
| ``` | ||
| Pipe anything through immolate and watch it burn | ||
| ``` | ||
| telnet towel.blinkenlights.nl | immolate | ||
| ``` | ||
| ``` | ||
| telnet towel.blinkenlights.nl | immolate --matrix | ||
| ``` | ||
| ``` | ||
| telnet towel.blinkenlights.nl | immolate --ice | ||
| ``` | ||
| ``` | ||
| telnet towel.blinkenlights.nl | immolate --fire --matrix | ||
| ``` | ||
+17
-11
@@ -6,5 +6,5 @@ #!/usr/bin/env node | ||
| const minimist = require('minimist'); | ||
| const fireColors = [196, 202, 208, 214, 220, 226]; | ||
| const iceColors = [27, 33, 39, 75, 117, 159, 195, 231]; | ||
| const matrixColors = [22, 28, 34, 40, 46, 82, 119, 157]; | ||
| const fireColors = [196, 202, 208, 214, 220, 226, 220, 214, 208, 202]; | ||
| const iceColors = [27, 33, 39, 75, 117, 159, 195, 231, 195, 159, 117, 75, 39, 33]; | ||
| const matrixColors = [22, 28, 34, 40, 46, 82, 119, 157, 119, 82, 46, 40, 34, 28]; | ||
@@ -24,15 +24,21 @@ const firestarters = fireColors.map(clc.xterm); | ||
| const coolDown = argv['ice'] || argv['i']; | ||
| const redpill = argv['matrix'] || argv['m']; | ||
| const redPill = argv['matrix'] || argv['m']; | ||
| const painters = !(fireUp || coolDown || redpill) ? firestarters : [ | ||
| const painters = !(fireUp || coolDown || redPill) ? firestarters : [ | ||
| ...(coolDown ? extinguishers : []), | ||
| ...(fireUp ? firestarters : []), | ||
| ...(redpill ? matrix : []) | ||
| ...(redPill ? matrix : []) | ||
| ]; | ||
| const line = string => { | ||
| const x = Math.round(a + b + b * Math.sin(i++ * q)); | ||
| // const x = (a + (i++ % b)); | ||
| const regex = new RegExp(`(.|[\r\n]){1,${x}}`, 'g'); | ||
| return string.toString().match(regex).map((substring, j) => painters[j % painters.length](substring)).join('') + "\r"; | ||
| const line = buffer => { | ||
| const string = buffer.toString(); | ||
| const x = Math.round(a + b + b * Math.sin(i++ * q) + 3 * Math.random()); | ||
| const chunks = []; | ||
| for (let i = 0; i * x < buffer.length; i++) { | ||
| const painter = painters[i % painters.length]; | ||
| const chunk = painter(string.slice(i * x, (i + 1) * x)); | ||
| chunks.push(chunk); | ||
| } | ||
| return chunks.join(''); | ||
| } | ||
@@ -39,0 +45,0 @@ |
+1
-1
| { | ||
| "name": "immolate", | ||
| "version": "1.0.0", | ||
| "version": "1.1.0", | ||
| "description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
2213
30.33%4
33.33%35
16.67%1
-50%29
Infinity%