painbrush
1.0.21.1.0
src-packer/helpers.js+
src-packer/helpers.jsNew file+23
Index: package/src-packer/helpers.js
===================================================================
--- package/src-packer/helpers.js
+++ package/src-packer/helpers.js
@@ -0,0 +1,23 @@
+import chalk from "chalk";
+export const printCharacter = (char, width) => {
+ for (let index = 0; index < char.length; index++) {
+ const element = char[index];
+ if (index !== 0 && index % width === 0) {
+ process.stdout.write(` - ${index} - ${width}` + "\n");
+ }
+ process.stdout.write(element ? chalk.bgYellowBright("◼") : "◻");
+ }
+};
+const report = (type) => (msg) => {
+ const prefix = {
+ 0: chalk.green(`✓ `),
+ 1: chalk.red(`☠ `),
+ 2: chalk.blue(`ℹ︎ `),
+ }[type];
+ console.log(prefix + msg);
+};
+export const reportYay = report(0);
+export const reportNay = (msg) => {
+ report(1)(msg);
+};
+export const reportInfo = report(2);