redis-commands

Redis commands

MIT 18 个版本
安装
npm install redis-commands
yarn add redis-commands
pnpm add redis-commands
bun add redis-commands
README

Redis Commands

Build Status Code Climate Test Coverage

This module exports all the commands that Redis supports.

Install

$ npm install redis-commands

Usage

var commands = require('redis-commands');

.list is an array contains all the lowercased commands:

commands.list.forEach(function (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]

Acknowledgment

Thank @Yuan Chuan for the package name. The original redis-commands is renamed to @yuanchuan/redis-commands.

版本列表
1.7.0 2021-02-06
1.6.0 2020-07-25
1.5.0 2019-05-10
1.4.0 2018-10-08
1.3.5 2018-02-28
1.3.4 2018-02-26
1.3.3 2018-02-24
1.3.2 2018-02-24
1.3.1 2017-01-25
1.3.0 2016-10-20
1.2.0 2016-04-21
1.1.0 2016-02-09
1.0.2 2016-01-03
1.0.1 2015-11-23
1.0.0 2015-10-31
0.0.3 2013-05-27
0.0.2 2013-04-28
0.0.1 2013-04-25