【文件属性】:
文件名称:redis-commands:导出所有可用Redis命令及其支持的Redis版本的模块
文件大小:39KB
文件格式:ZIP
更新时间:2021-05-02 09:13:39
JavaScript
Redis命令
此模块导出Redis支持的所有命令。
安装
$ npm install redis-commands
用法
var commands = require ( 'redis-commands' ) ;
.list是一个包含所有小写命令的数组:
commands . list . forEach ( function ( command ) {
console . log ( command ) ;
} ) ;
.exists()用于检查命令是否存在:
commands . exists ( 'set' ) // true
commands . exists ( 'other-command' ) // false
.hasFlag()用于检查命令是否具有标志:
commands . hasFlag ( 'set' , 'readonly' ) // fals
【文件预览】:
redis-commands-master
----.gitignore(593B)
----package.json(1KB)
----package-lock.json(109KB)
----.travis.yml(269B)
----changelog.md(1KB)
----commands.json(32KB)
----LICENSE(1KB)
----index.js(4KB)
----tools()
--------build.js(2KB)
----README.md(1KB)
----.npmignore(123B)
----test()
--------index.js(6KB)