Related to:
log:
chat {
msg: 'ping',
userId: 363896575396806660,
createdAt: 1697603525583,
id: 'K0QjcRK',
}
userId 363896575396806667
script snippet:
const payload = {
id,
msg,
userId, // it's string type
createdAt,
}
console.log('payload', payload)
await kv.hset(`chat:${id}`, payload) // but somehow here, it's converted to a number leading to a precision loss in the last digit
version:
"@vercel/kv": "^0.2.3",
Vercel masks Upstash's library, so I report it here.