This package provides a comprehensive list of all Redis commands, their flags, and utility functions. Version 1.7.0 is stable and maintained as part of the NodeRedis ecosystem. It exports an array of all lowercased command names, a function to check command existence, a function to test for specific flags (e.g., 'readonly'), and a function to extract key indexes from command arguments. It is commonly used internally by Redis clients like node_redis to validate commands and parse key positions. The package is lightweight, has no runtime dependencies, and is primarily used in Node.js environments.
npm install redis-commandsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Imports and demonstrates all four exported functions: list, exists, hasFlag, getKeyIndexes.
Use named exports with require or destructure.
Always lowercase command names: commands.exists('SET') returns false.Check the Redis server's command table if using modules.
Use require('redis-commands') and destructure.Add const commands = require('redis-commands'); or destructure.No dependency data recorded yet.