Example Contents

Example Contents

by steen_hansen

HTML

<!DOCTYPE html><meta charset="utf-8" />
<title>TypeCzech</title>

<!--            ------------TYPE 4------------------------------       -->

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/steenhansen/type-czech@latest/web-resources/type-czech.css">
<script src="https://cdn.jsdelivr.net/gh/steenhansen/type-czech@latest/web-resources/TypeCzech.min.js"></script>
<script>
  type_czech = TypeCzech('LOG-ERRORS')
</script>
<!--            -------------TYPE 4-----------------------------       -->

<style>
  div {
    margin-top:8px;
  }
  
  .functions{
    margin-left:100px;
    margin-bottom:16px;
  }
  
  a {
    margin-left:16px;
  }
    
  * {
    font-family: arial;
  }
  
  pre {
    font-family: 'Inconsolata', monospace;
  }
  
  </style>
  
  <h2>TypeCzech</h2>
  
  <p>
    TypeCzech is a detachable run-time type checking JavaScript library that can be toggled on and off.
    Include one file in your web page or in your Node.js file to allow you to type check function parameters
    and results. Errors can be set to throw exceptions or just output to the Console.
    The motivation is to verify function parameters before execution, and function results after completion with 
    PRE_check() and POST_check() funtions.
  </p>



<a target="_blank" href="https://jsfiddle.net/steen_hansen/7c2q54v0/?000-Shortest-Possible-Example">The shortest possible example</a> on a live JSFiddle.


<h3>GitHub</h3>
<a title="TypeCzech" href="https://github.com/steenhansen/type-czech" target="_blank">TypeCzech</a> project with tests


<h3>Local TypeCzech Tutorial</h3>


<div><a title="00-Readme-Example" href="https://jsfiddle.net/steen_hansen/0xtpLwsc/?00-Readme-Example" target="_blank">00-Readme-Example</a>
- Realistic example of verifying types and checking emptiness
</div>

<div><a title="01-What-is-TypeCzech" href="https://jsfiddle.net/steen_hansen/9u54vsd2/?01-What-is-TypeCzech" target="_blank">01-What-is-TypeCzech</a>
  - Check function parameters before task, and...