🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

redis-commands

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis-commands

Redis commands

1.7.0
latest
Version published
Weekly downloads
1.7M
-27.9%
Maintainers
3
Weekly downloads
 
Created

What is redis-commands?

The redis-commands npm package provides a comprehensive list of Redis commands, including their names, arity, flags, and other metadata. It is useful for developers who need to interact with Redis and want to programmatically access command information.

What are redis-commands's main functionalities?

Get All Commands

This feature allows you to retrieve a list of all Redis commands. The `commands.list` property contains an array of all command names.

const commands = require('redis-commands');
console.log(commands.list);

Get Command Details

This feature allows you to get detailed information about a specific Redis command. The `commands.get('set')` method returns an object with details such as arity, flags, and other metadata for the 'set' command.

const commands = require('redis-commands');
console.log(commands.get('set'));

Check Command Existence

This feature allows you to check if a specific Redis command exists. The `commands.exists('get')` method returns true if the command exists and false otherwise.

const commands = require('redis-commands');
console.log(commands.exists('get'));
console.log(commands.exists('nonexistent'));

Get Command Flags

This feature allows you to retrieve the flags associated with a specific Redis command. The `commands.get('set').flags` property returns an array of flags for the 'set' command.

const commands = require('redis-commands');
console.log(commands.get('set').flags);

Other packages similar to redis-commands

FAQs

Package last updated on 06 Feb 2021

Did you know?

Socket

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.

Install

Related posts