GitHub Package
the javascript
Contents 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43    101 102 103 201 202 203 204 301 302 303 304 401 402 403 404 501 502 503 504 601 602 603 604    700 701 702 703 704 705 706 707 708 709 710 © 2024 Steen Hansen
14 - Array and Object Types with Parameter and Results

Typeless arrays can be checked for without giving any dimensionality, if [ ]s are used then an array must define at least one type. And, 'object' can also be a type without specifying any properties. But if { }s are used then an object must define at least one key and value.
airplanes = [{manu:'Lockheed', name:'Starfighter'}, {manu:'Avro', name:'Vulcan'}]
type_czech.checkParam_type(airplanes, ['objects']) // pass

movie_array = ["Red Rock West", "Breakfast at Tiffany's", "Blue Velvet"]
type_czech.checkParam_type(movie_array, ['objects']) // fail
Alan Turing is used to show the error messages that occur when an object is checkParam_type()ed against the 'array' type in the PRE_check_Person() checking function. The reverse, testing an array against the 'object' type is then shown in the POST_check_Person() function.

Console Output