Bump to v4.7.0.

This commit is contained in:
John-David Dalton
2016-03-26 00:00:01 -07:00
parent 6c2960211f
commit d46bcaa98d
389 changed files with 3333 additions and 1627 deletions

View File

@@ -1,4 +1,4 @@
define(['./isFunction', './isObject'], function(isFunction, isObject) {
define(['./isFunction', './isObject', './isSymbol'], function(isFunction, isObject, isSymbol) {
/** Used as references for various `Number` constants. */
var NAN = 0 / 0;
@@ -23,6 +23,7 @@ define(['./isFunction', './isObject'], function(isFunction, isObject) {
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
@@ -41,12 +42,18 @@ define(['./isFunction', './isObject'], function(isFunction, isObject) {
* // => 3
*/
function toNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
if (isObject(value)) {
var other = isFunction(value.valueOf) ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
}
if (typeof value != 'string') {
return value === 0 ? value : +value;
return value === 0 ? value : +value;
}
value = value.replace(reTrim, '');
var isBinary = reIsBinary.test(value);