btrconsole
v1.1.9
Published
The better version of a console (or is it?)!
Downloads
23
Readme
btrconsole
What is btrconsole?
btrconsole
is an enhanced version of the JavaScript console with additional functions.
Functions:
NOTE: Functions that were tested will contain a note. Usually newer functions are tested.
- debugModule: Logs information about the module to the console.
- out: Outputs whatever you insert.
- err: Logs an error to the console.
- inf: Logs info to the console (similar to
out
but different). - wrn: Logs a warning to the console (similar to
err
). - math: Four operators (+, -, *, /). Can be used to concatenate strings using
+
. - throw404: If set to true, a 404 will be thrown; otherwise, nothing will happen.
- logWithTimeStamp: Log a message to the console with a timestamp.
- generateRandomNumber: Define a minimum and maximum number (minimum must be under maximum).
- getUserInput:
readline-sync
's question function. - capitalizeString: Capitalizes the first letter of a string.
- calculateAverage: Calculates the average of an array of numbers.
- greetUser: Asks for input and greets you
- isEven: Checks if the number you have entered is even
- calculateFactorial: Calculate the factorial of the number (n), must be a POSITIVE (+) integer NOTE: It will return
infinity
if number is too large.
Recommended Definitions:
bc
: Shortest waybconsole
: Shorter than defaultbtrconsole
: Defaultbetterc
: Somehow shorter thanbconsole
btrc
: Also shortbetterconsole
: The longest and not recommended
Updates (1.1.9):
- Added new
calculateFactorial
function