btrconsole

1.1.9 • Public • Published

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 way
  • bconsole: Shorter than default
  • btrconsole: Default
  • betterc: Somehow shorter than bconsole
  • btrc: Also short
  • betterconsole: The longest and not recommended

Updates (1.1.9):

  • Added new calculateFactorial function

Package Sidebar

Install

npm i btrconsole

Weekly Downloads

0

Version

1.1.9

License

ISC

Unpacked Size

6.59 kB

Total Files

4

Last publish

Collaborators

  • npmcool