Function splitWhitespace

  • Splits a string or an array of strings (recursively) by whitespace.

    Parameters

    Returns string[]

    splitWhitespace('a b c'); // ['a', 'b', 'c']
    splitWhitespace(['a b', 'c']); // ['a', 'b', 'c']
    splitWhitespace(['a ', ['b', ['c d']]]); // ['a', 'b', 'c', 'd']