Skip to main content

Documentation Index

Fetch the complete documentation index at: https://upstash.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Arguments

key
string
required
The key of the hash.
field
string
required
The field to increment
increment
float
required
How much to increment the field by. Can be negative to subtract.

Response

The new value of the field after the increment.
await redis.hset("key", {
  field: 20,
  });
const after = await redis.hincrby("key", "field", 2.5);
console.log(after); // 22.5