redis-argument-parser

Parse types of arguments for a Redis command.

Usage no npm install needed!

<script type="module">
  import redisArgumentParser from 'https://cdn.skypack.dev/redis-argument-parser';
</script>

README

Parse types of arguments for a Redis command.

Usage

var parser = require('redis-argument-parser')
var command = new parser.RedisCommand('mset') // or 'MSET'
var types = command.parseInputs(['k1', 1, 'k2', 2])
console.log(types)
// [ 'key', 'string', 'key', 'string' ]