
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@ioredis/commands
Advanced tools
This module exports all the commands that Redis supports.
$ npm install @ioredis/commands
const commands = require('@ioredis/commands');
.list is an array contains all the lowercased commands:
commands.list.forEach((command) => {
console.log(command);
});
.exists() is used to check if the command exists:
commands.exists('set') // true
commands.exists('other-command') // false
.hasFlag() is used to check if the command has the flag:
commands.hasFlag('set', 'readonly') // false
.getKeyIndexes() is used to get the indexes of keys in the command arguments:
commands.getKeyIndexes('set', ['key', 'value']) // [0]
commands.getKeyIndexes('mget', ['key1', 'key2']) // [0, 1]
The 'redis' npm package is a popular client for interacting with Redis databases. It provides a similar set of functionalities for executing Redis commands, but it is generally considered to be less feature-rich and less performant compared to ioredis.
The 'node-redis' package is another Redis client for Node.js. It offers a straightforward API for executing Redis commands and is known for its simplicity and ease of use. However, it may lack some of the advanced features and optimizations found in ioredis.
FAQs
Redis commands
The npm package @ioredis/commands receives a total of 5,246,701 weekly downloads. As such, @ioredis/commands popularity was classified as popular.
We found that @ioredis/commands demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.