mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +00:00
Remove unneeded baseToString use.
This commit is contained in:
@@ -520,7 +520,7 @@
|
||||
*/
|
||||
var isHostObject = (function() {
|
||||
try {
|
||||
baseToString({ 'toString': 0 });
|
||||
Object({ 'toString': 0 } + '');
|
||||
} catch(e) {
|
||||
return function() { return false; };
|
||||
}
|
||||
@@ -3269,7 +3269,7 @@
|
||||
return '';
|
||||
}
|
||||
var padLength = length - strLength;
|
||||
chars = chars == null ? ' ' : baseToString(chars);
|
||||
chars = chars == null ? ' ' : (chars + '');
|
||||
return repeat(chars, ceil(padLength / chars.length)).slice(0, padLength);
|
||||
}
|
||||
|
||||
@@ -3462,7 +3462,7 @@
|
||||
case stringTag:
|
||||
// Coerce regexes to strings and treat strings primitives and string
|
||||
// objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.
|
||||
return object == baseToString(other);
|
||||
return object == (other + '');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user