Javascript Code Function Clean Array NO Duplicates, Empty Lines & Multiple Spaces Removed

Javascript Code Function to Take an Array and [1] Remove Empty Lines or Lines of the Array that are Only Whitespace [2] Replace Multiple Spaces with Single Space and Trim Each Line of Array [3] Remove Duplicate Items from the Array

Home Short:

Here is a handy and compact function to totally clean an array by ...

  1. Removing empty or whitespace only lines.
  2. Remove multiple spaces from each array item.
  3. Remove duplicates.

Returning an array with no duplicates or blank entries each element of the array is trimmed with multiple spaces removed

S
H
A
R
E