Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
axlecoffee committed Oct 14, 2024
2 parents 6407710 + a1f35db commit 889a92e
Show file tree
Hide file tree
Showing 5 changed files with 2,284 additions and 20 deletions.
36 changes: 18 additions & 18 deletions funny.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
const calculateElement = (index, multiplier) => {
const isEvenIndex = index % 2 === 0;
const power = isEvenIndex ? 1 : index;
const chalk = require("chalk")

return Math.sin(index / multiplier) * Math.pow(multiplier, power);
};
Logger()

const generateArray = (size, multiplier, elementCalculator) => {
return Array.from({ length: size }, (_, index) => elementCalculator(index + 1, multiplier));
};

const mainFunction = (outerSize, innerSize, innerMultiplier) => {
const outerArray = generateArray(outerSize, innerSize, (index, multiplier) => {
return generateArray(index, multiplier, calculateElement);
});

return outerArray;
};

const result = mainFunction(3, 4, 2);
console.log(result);
function Logger(message){
let space = chalk.bgBlack.black(" ")
let color_bars = {
error: chalk.bgBlack.red.bold("[ERROR]"),
broadcast: chalk.bgBlack.bold.blue("[BRODCAST]"),
internal: chalk.bgBlack.green.bold("[Internal]"),
debug: chalk.bgBlack.gray.bold("[DEBUG]"),
warn: chalk.bgBlack.yellow.bold("[WARN]")
}
Object.keys(color_bars).forEach(key => {
console.log(color_bars[key]);
});
}
let skystatsColor = chalk.hex("ffa600");
return console.log(skystatsColor.bold.bgBlack(`[SkyStats | 10:43:33]`)
)
Loading

0 comments on commit 889a92e

Please sign in to comment.