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
- "" - 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.