27 - Typed and Empty Union Checks with Optionals
by steen_hansen
HTML
<!DOCTYPE html><meta charset="utf-8" />
<title>27-Type-and-Emptiness-with-Extra-Parameter-Option-Objects</title>
<div id='js-div' style="width:53%">
<a href='https://github.com/steenhansen/type-czech' class='git-hub'>GitHub Package</a>
<div id='js-code'>the javascript</div>
</div>
<div id="the-explanation" style="width:47%">
<div class='an-explantion'>27 – Type and Emptiness Together with Extra Parameter Option Objects</div>
<div id='explanation-text'>
<br>
Option objects can have extra parameters that are not checked for type or emptiness.
Important wanted parameters are still checked, but unlisted arguments are ignored.
<br><br>
In the example to the left, by using the check_typeExtra()
function, only the listed parameters of 'salu', 'f_name', and 'l_name' are checked for valid types.
<br><br>
Only the parameters 'f_name' and 'l_name' are checked for emptiness with the check_emptyExtra() function.
<br><br>
</div>
<div id="console-log" >
<div class='a-title'>Console Output</div>
<div id='log-text'></div>
<br>
</div>
<br>
<!-- --------------TYPE 1---------------------------- -->
<script src="https://cdn.jsdelivr.net/gh/steenhansen/type-czech/web-resources/consolelog.js"></script>
<script src="https://cdn.jsdelivr.net/gh/steenhansen/type-czech/web-resources/TypeCzech.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/steenhansen/type-czech/web-resources/type-czech.css">
<!-- ---------------TYPE 1s--------------------------- -->
<div id='js-fiddles'>
<a title="Example-Contents" href="https://jsfiddle.net/steen_hansen/1Lshcept/?Example-Contents" target="_blank">Contents</a>
<a title="00-Readme-Example" href="https://jsfiddle.net/steen_hansen/0xtpLwsc/?00-Readme-Example" target="_blank">00</a>
<a title="01-PRE-and-POST-Funtions" href="https://jsfiddle.net/steen_hansen/9u54vsd2/?01-PRE-and-POST-Functions"...