From 9cb75cae1d471ffc1672f0074010ea8aad71f9a9 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 16 Apr 2016 18:00:31 -0700 Subject: [PATCH] Add jsdocs for `baseToNumber` and `baseToString`. --- lodash.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lodash.js b/lodash.js index c06837d6f..b27967fd0 100644 --- a/lodash.js +++ b/lodash.js @@ -3689,6 +3689,14 @@ return result; } + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ function baseToNumber(value) { if (typeof value == 'number') { return value; @@ -3699,6 +3707,14 @@ return +value; } + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings or preserve the sign of `-0`. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') {