function words(string, pattern, guard) {
  string = toString(string);
  pattern = guard ? undefined : pattern;

  if (pattern === undefined) {
    pattern = reHasComplexWord.test(string) ? reComplexWord : reBasicWord;
  }
  return string.match(pattern) || [];
}
Splits `string` into an array of its words.

@static
@memberOf _
@category String
@param {string} [string=''] The string to inspect.
@param {RegExp|string} [pattern] The pattern to match words.
@param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
@returns {Array} Returns the words of `string`.
@example

_.words('fred, barney, & pebbles');
// => ['fred', 'barney', 'pebbles']

_.words('fred, barney, & pebbles', /[^, ]+/g);
// => ['fred', 'barney', '&', 'pebbles']