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
19 - Lone Empty Parameter and Result
Use checkParam_empty() to verify that a lone parameter or return result is not empty. Good for ensuring that a function's single string, array, and object parameter and or result has a useful value. When a parameter corresponds to 'EMPTY-ERROR' and its contents are valueless then an error is returned, which causes the PRE_check function to throw an exception or console log the error.
Empty or
Valueless Data
  • null
  • undefined
  • "" - empty string
  • NaN - not a number
  • [ ] - no elements in array
  • { } - no members in object
  • new Date("")
  • new RegExp("") or /(?:)/
  • Empty Categories
  • 'EMPTY-OK'
    Valueless variable is ok
  • 'EMPTY-ER' Valueless
    variable is an Error
  • 'EMPTY-IGNORE'   Functions, Symbols, BigInts,
  • and Booleans cannot be empty; a hint

Generally only 'EMPTY-ER' is very useful.

Console Output