36 - Turn-On, Turn-Off, and Show TypeCzech Counting

by steen_hansen

HTML

<!DOCTYPE html><meta charset="utf-8" />
<title>36 Turn-On, Turn-Off, and Show TypeCzech Counts</title>


  
  <div id='js-div' style="width:55%">
    <a href='https://github.com/steenhansen/type-czech'  target="_blank" class='git-hub'>GitHub Package</a>
  <div id='js-code'>the javascript</div>
</div>

<div id="the-explanation" style="width:45%">
  <div class='an-explantion'>36 - Turn-On, Turn-Off, and Show TypeCzech Counts</div>
  <div id='explanation-text'>
    <br>

    TypeCzech can stop and start checking parameters with:
    <ul>
      <li><b>enableTests()</b></li>
      <li><b>disableTests()</b></li>
    </ul>
    TypeCzech defaults to checking parameters when initilized.
    
    Show the number of errors and checks found with:
    <ul>
      <li><b>countFails()</b></li>
      <li><b>countTally()</b></li>
    </ul>


 Once TypeCzech is logging or throwing errors from checking functions, then the only
way to stop the test exceptions or console logging is to is use the type_czech.disableTests()
function. From then on all PRE and POST checking functions will not report errors, but will
still consume
a non-trivial amount of resources. So <b>never use type_czech.disableTests() in production</b>.
<br><br>

Note that enableTests() cannot start TypeCzech function checking from a non-active TypeCzech instance.
Also enableTests() resets test counting to 0.
<br><br>
  </div>


  <div id="console-log">
    <div class='a-title'>Console Output</div>
    <div id='log-text'></div>
    <br>
  </div>

  <br><br>







<!--            ----------------TYPE 1--------------------------       -->
<script src="https://cdn.jsdelivr.net/gh/steenhansen/type-czech@latest/web-resources/consolelog.js"></script>
<script src="https://cdn.jsdelivr.net/gh/steenhansen/type-czech@latest/web-resources/TypeCzech.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/steenhansen/type-czech@latest/web-resources/type-czech.css">
<!--            --------------TYPE...