Skip to content

Latest commit

 

History

History
54 lines (53 loc) · 2.62 KB

Console.md

File metadata and controls

54 lines (53 loc) · 2.62 KB

Class: Console

Encapsulates methods used to print some information in the console. Instance of this class is declared in the global JavaScript context and is accessible by directly calling console.[xxx] methods.

Instance Functions
  • time( reportName String )
    Begins counting a time span for a given name (key).
    • reportName - String
      The key for the operation.
  • timeEnd( reportName String )
    Ends a previously started time span through the time method.
    • reportName - String
      The key for the operation. Must have an already started time(reportName) operation with the same key.
  • assert( test Boolean, message String, ...formatParams Array of Object )
    Asserts a boolean condition and prints a message in case the assert fails.
    • test - Boolean
      A value that should not be Falsy.
    • message - String
      The message to be displayed in case the asserted value is Falsy.
    • ...formatParams - Array of Object
      Optional formatting parameters to be applied to the printed message.
  • info( message Object, ...formatParams Array of Object )
    Reports some information.
    • message - Object
      The information message to be printed to the console.
    • ...formatParams - Array of Object
      Optional formatting parameters to be applied to the printed message.
  • warn( message Object, ...formatParams Array of Object )
    Reports a warning.
    • message - Object
      The warning message to be printed to the console.
    • ...formatParams - Array of Object
      Optional formatting parameters to be applied to the printed message.
  • error( message Object, ...formatParams Array of Object )
    Reports an error.
    • message - Object
      The error message to be printed to the console.
    • ...formatParams - Array of Object
      Optional formatting parameters to be applied to the printed message.
  • log( message Object, ...formatParams Array of Object )
    Verbously logs a message.
    • message - Object
      The message to be printed to the console.
    • ...formatParams - Array of Object
      Optional formatting parameters to be applied to the printed message.
  • trace()
    Prints the current stack trace in the console.
  • dump( obj Object )
    Prints the state of the specified object to the console.
    • obj - Object
      The object instance to be dumped.
  • dir( obj Object )
    Prints the state of the specified object to the console.
    • obj - Object