Bump to v4.11.2.

This commit is contained in:
John-David Dalton
2016-04-19 22:17:16 -07:00
parent 29c408ee8a
commit ccdfca5392
86 changed files with 714 additions and 447 deletions

View File

@@ -1,14 +1,4 @@
define(['./_Symbol', './isSymbol'], function(Symbol, isSymbol) {
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
var undefined;
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolToString = symbolProto ? symbolProto.toString : undefined;
define(['./_baseToString'], function(baseToString) {
/**
* Converts `value` to a string. An empty string is returned for `null`
@@ -32,18 +22,7 @@ define(['./_Symbol', './isSymbol'], function(Symbol, isSymbol) {
* // => '1,2,3'
*/
function toString(value) {
// Exit early for strings to avoid a performance hit in some environments.
if (typeof value == 'string') {
return value;
}
if (value == null) {
return '';
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
return value == null ? '' : baseToString(value);
}
return toString;