mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Remove toString coercion method use.
This commit is contained in:
2
words.js
2
words.js
@@ -1,6 +1,5 @@
|
||||
import asciiWords from './.internal/asciiWords.js'
|
||||
import hasUnicodeWord from './.internal/hasUnicodeWord.js'
|
||||
import toString from './toString.js'
|
||||
import unicodeWords from './.internal/unicodeWords.js'
|
||||
|
||||
/**
|
||||
@@ -20,7 +19,6 @@ import unicodeWords from './.internal/unicodeWords.js'
|
||||
* // => ['fred', 'barney', '&', 'pebbles']
|
||||
*/
|
||||
function words(string, pattern) {
|
||||
string = toString(string)
|
||||
if (pattern === undefined) {
|
||||
return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user