function words(subject, pattern, flags) {
    var subjectString = coerceToString(subject);
    var patternRegExp;

    if (isNil(pattern)) {
      patternRegExp = REGEXP_EXTENDED_ASCII.test(subjectString) ? REGEXP_LATIN_WORD : REGEXP_WORD;
    } else if (pattern instanceof RegExp) {
      patternRegExp = pattern;
    } else {
      var flagsString = toString(nilDefault(flags, ''));
      patternRegExp = new RegExp(toString(pattern), flagsString);
    }

    return nilDefault(subjectString.match(patternRegExp), []);
  }
Splits `subject` into an array of words.

@function words
@static
@since 1.0.0
@memberOf Split
@param {string} [subject=''] The string to split into words.
@param {string|RegExp} [pattern] The pattern to watch words. If `pattern` is not RegExp, it is transformed to `new RegExp(pattern, flags)`.
@param {string} [flags=''] The regular expression flags. Applies when `pattern` is string type.
@return {Array} Returns the array of words.
@example
v.words('gravity can cross dimensions');
// => ['gravity', 'can', 'cross', 'dimensions']

v.words('GravityCanCrossDimensions');
// => ['Gravity', 'Can', 'Cross', 'Dimensions']

v.words('Gravity - can cross dimensions!');
// => ['Gravity', 'can', 'cross', 'dimensions']

v.words('Earth gravity', /[^\s]+/g);
// => ['Earth', 'gravity']