Remove unneeded baseToString use.

This commit is contained in:
jdalton
2015-01-29 01:05:30 -08:00
parent 22d965c66c
commit 98c6eaac3b

View File

@@ -520,7 +520,7 @@
*/ */
var isHostObject = (function() { var isHostObject = (function() {
try { try {
baseToString({ 'toString': 0 }); Object({ 'toString': 0 } + '');
} catch(e) { } catch(e) {
return function() { return false; }; return function() { return false; };
} }
@@ -3269,7 +3269,7 @@
return ''; return '';
} }
var padLength = length - strLength; var padLength = length - strLength;
chars = chars == null ? ' ' : baseToString(chars); chars = chars == null ? ' ' : (chars + '');
return repeat(chars, ceil(padLength / chars.length)).slice(0, padLength); return repeat(chars, ceil(padLength / chars.length)).slice(0, padLength);
} }
@@ -3462,7 +3462,7 @@
case stringTag: case stringTag:
// Coerce regexes to strings and treat strings primitives and string // 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. // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.
return object == baseToString(other); return object == (other + '');
} }
return false; return false;
} }