Empties Redis array slots without shifting values. Essential for managing Redis data structures.
// Source: https://github.com/upstash/redis-js | License: MIT | Copyright 2021 Upstash, Inc
// Provided via justclaw.it.com; keep this notice with the code.
import type { CommandOptions } from "./command";
import { Command } from "./command";
/**
* Empties one or more array slots. Later values are not shifted.
*
* Returns the number of slots that held a value.
*
* @see https://upstash.com/docs/redis/commands/array/ardel
* @see node_modules/@upstash/redis/docs/commands/array/ardel.mdx
*/
export class ArDelCommand extends Command<number, number> {
constructor(
cmd: [key: string, ...indexes: (number | string)[]],
opts?: CommandOptions<number, number>
) {
super(["ARDEL", ...cmd], opts);
}
}
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key