@ioredis/commands
Redis commands
Last updated 2 years ago by ioredis-robot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @ioredis/commands 
SYNC missed versions from official npm registry.

Redis Commands

This module exports all the commands that Redis supports.

Install

$ npm install @ioredis/commands

Usage

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]

Current Tags

  • 1.2.0                                ...           latest (2 years ago)

9 Versions

  • 1.2.0                                ...           2 years ago
  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 0.2.1                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (2)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE