Files
NapCatQQ/.pnpm-store/v3/files/09/a16ff49b09fc499c5799335914311853d3885771d81197fbfbff2fe6d7bf6ab79e5a210ae0d23ef1fa9a9c6fcfda8f22d710a88d318d73cadb3fc2c5da4ce6
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

22 lines
521 B
Plaintext

import isSymbol from './isSymbol.js';
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/**
* 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.
*/
function toKey(value) {
if (typeof value == 'string' || isSymbol(value)) {
return value;
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
export default toKey;