Remove semicolons.

This commit is contained in:
John-David Dalton
2017-02-04 23:50:10 -08:00
parent f3a8e55e70
commit 6cb3460fce
452 changed files with 4261 additions and 4261 deletions

View File

@@ -1,7 +1,7 @@
import asciiWords from './.internal/asciiWords.js';
import hasUnicodeWord from './.internal/hasUnicodeWord.js';
import toString from './toString.js';
import unicodeWords from './.internal/unicodeWords.js';
import asciiWords from './.internal/asciiWords.js'
import hasUnicodeWord from './.internal/hasUnicodeWord.js'
import toString from './toString.js'
import unicodeWords from './.internal/unicodeWords.js'
/**
* Splits `string` into an array of its words.
@@ -14,20 +14,20 @@ import unicodeWords from './.internal/unicodeWords.js';
* @returns {Array} Returns the words of `string`.
* @example
*
* words('fred, barney, & pebbles');
* words('fred, barney, & pebbles')
* // => ['fred', 'barney', 'pebbles']
*
* words('fred, barney, & pebbles', /[^, ]+/g);
* words('fred, barney, & pebbles', /[^, ]+/g)
* // => ['fred', 'barney', '&', 'pebbles']
*/
function words(string, pattern, guard) {
string = toString(string);
pattern = guard ? undefined : pattern;
string = toString(string)
pattern = guard ? undefined : pattern
if (pattern === undefined) {
return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string)
}
return string.match(pattern) || [];
return string.match(pattern) || []
}
export default words;
export default words