For those of you who absolutely love the JavaScript console and can’t stand people who say print is better than console.log, I’ve recreated the console object in Luau. Enjoy!
Disclaimers
AFAIK, there isn’t exactly a way to print to the output in the blue info text, so console.info() was not included.
console.clear() doesn’t actually clear the console, but prints a bunch of newlines.
From the looks of it, this seems really cool. I’ll take a look at the source later. console.error is useless since it just takes one simple line of code to do the job. Since this is a module, it wastes memory calling the function rather than using the error function that is built into roblox. Same goes for console.log; they both serve no purpose rather than wasting needed space. I see the outcome you are going for but I rather not sacrifice performance so I can have code that uses JavaScript functions to log messages/errors.
Well, it isn’t built for optimization. If you’re looking to squeeze the best performance out of your game, I would recommend that you do not use this as multiple methods (assert, error, log, warn) are just redefined functions.
However, if you like the console object and don’t care too much about performance, then I think you’ll enjoy using this.
You haven’t described any of the documents, you should probably also use better parameter names thing means literally nothing at all. Just a few things to work on. I’d also recommend you make the GitHub link more well known, along with linking to the actual model.