* Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key.
(value)
| 640 | * @returns {string|symbol} Returns the key. |
| 641 | */ |
| 642 | function toKey(value) { |
| 643 | if (typeof value == 'string' || isSymbol(value)) { |
| 644 | return value; |
| 645 | } |
| 646 | const result = value + ''; |
| 647 | return result == '0' && 1 / value == -INFINITY ? '-0' : result; |
| 648 | } |
| 649 | |
| 650 | /** |
| 651 | * Converts `func` to its source code. |