0.0.3 • Published 7 years ago

agg-commands v0.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

AGG++ Commands

This module exports all the commands that AGG++ supports.

Install

$ npm install agg-commands

Usage

var commands = require('agg-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('get') // true
commands.exists('other-command') // false

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

commands.hasFlag('GET', 'readonly') // false

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

commands.getKeyIndexes('INC', ['key', 'value']) // [0]
commands.getKeyIndexes('GET', ['key1']) // [0]
0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago