mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 10:17:48 +00:00
Add jsdocs for baseToNumber and baseToString.
This commit is contained in:
16
lodash.js
16
lodash.js
@@ -3689,6 +3689,14 @@
|
|||||||
return result;
|
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) {
|
function baseToNumber(value) {
|
||||||
if (typeof value == 'number') {
|
if (typeof value == 'number') {
|
||||||
return value;
|
return value;
|
||||||
@@ -3699,6 +3707,14 @@
|
|||||||
return +value;
|
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) {
|
function baseToString(value) {
|
||||||
// Exit early for strings to avoid a performance hit in some environments.
|
// Exit early for strings to avoid a performance hit in some environments.
|
||||||
if (typeof value == 'string') {
|
if (typeof value == 'string') {
|
||||||
|
|||||||
Reference in New Issue
Block a user