1 var isSymbol = require('./isSymbol');
3 /** Used as references for various `Number` constants. */
7 * Converts `value` to a string key if it's not a string or symbol.
10 * @param {*} value The value to inspect.
11 * @returns {string|symbol} Returns the key.
13 function toKey(value) {
14 if (typeof value == 'string' || isSymbol(value)) {
17 var result = (value + '');
18 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
21 module.exports = toKey;