NodeRedis/redis-commands

Name: redis-commands

Owner: NodeRedis

Description: Redis commands

Created: 2015-03-25 10:37:13.0

Updated: 2018-05-23 20:41:01.0

Pushed: 2018-05-23 20:40:59.0

Homepage:

Size: 55

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Redis Commands

Build Status Code Climate Test Coverage

This module exports all the commands that Redis supports.

Install
m install redis-commands
Usage
commands = require('redis-commands');

.list is an array contains all the lowercased commands:

ands.list.forEach(function (command) {
nsole.log(command);

.exists() is used to check if the command exists:

ands.exists('set') // true
ands.exists('other-command') // false

.hasFlag() is used to check if the command has the flag:

ands.hasFlag('set', 'readonly') // false

.getKeyIndexes() is used to get the indexes of keys in the command arguments:

ands.getKeyIndexes('set', ['key', 'value']) // [0]
ands.getKeyIndexes('mget', ['key1', 'key2']) // [0, 1]
Acknowledgment

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


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.