Skip to main content

removeEmpty

Removes from a given list any non-existent or empty values of supported types. A String is empty if it contains only whitespace characters. A list or map is empty if their length == 0.

removeEmpty(listOfValues)
# Or
removeEmpty(...args)

Parameters#

  • listOfValues: list containing values of supported types
  • args: A supported value argument

Returns#

  • Modified list

Example#

assertTrue(removeEmpty([{}, [], "   ", 32]) == [32])