@ioredis/commands
Redis commands
Last updated 4 days ago by dmaier-redislabs .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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.6.0                                ...           latest (4 days ago)

15 Versions

  • 1.6.0                                ...           4 days ago
  • 1.5.1                                ...           2 months ago
  • 1.5.0                                ...           5 months ago
  • 1.4.0                                ...           7 months ago
  • 1.3.1                                ...           7 months ago
  • 1.3.0                                ...           8 months ago
  • 1.2.0                                ...           4 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |