{"name":"@ioredis/commands","version":"2.0.0","keywords":["redis","commands","prefix"],"author":{"url":"http://zihua.li","name":"Zihua Li","email":"i@zihua.li"},"license":"MIT","_id":"@ioredis/commands@2.0.0","maintainers":[{"name":"ioredis-robot","email":"ioredis-robot@zihua.li"},{"name":"dmaier-redislabs","email":"david.maier@redis.com"},{"name":"nkaradzhov","email":"nkaradzhov89@gmail.com"}],"homepage":"https://github.com/ioredis/commands","bugs":{"url":"https://github.com/ioredis/commands/issues"},"dist":{"shasum":"7207c56e0be51fd9f2ec2505ebdb9372a3ceb76d","tarball":"http://registry-npm.ywwl.com/@ioredis/commands/download/@ioredis/commands-2.0.0.tgz","fileCount":6,"integrity":"sha512-vrx0AE/T0h7cRZwfo1M39Cr+ZhZrkf0V8mQN75wucKCxCLD9l/VX6no3gFvrLqD1IlG/1LtzWovqEw3t0Vr9zg==","signatures":[{"sig":"MEUCIQDb7RZkLrYxBiSNljYHJNnl8zErVMcB7OI5ZUkIlJsT4wIgBSIHRNJL80oMWX2QIfPhhojTBd1I0ZZOPrenCndoV8o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDSamdjPZpGMhGZ2Ch5LJL02bmBy4OhRylife2+8trWSgIhAJENMpzTe45LOBRNISGVxWiA+w9WGcVaMOOla8kINsN3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":113719,"size":8230,"noattachment":false,"key":"/@ioredis/commands/-/@ioredis/commands-2.0.0.tgz"},"main":"built/index.js","types":"./built/index.d.ts","gitHead":"64b8c7d55f92fa105cf373794f939155661c9f11","scripts":{"gen":"node tools/build","lint":"standard --fix --verbose | snazzy","test":"mocha","build":"rm -rf built && tsc","pretest":"npm run lint","release":"release-it"},"_npmUser":{"name":"dmaier-redislabs","email":"david.maier@redis.com"},"repository":{"url":"git+https://github.com/ioredis/commands.git","type":"git"},"_npmVersion":"11.16.0","description":"Redis commands","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.6","mocha":"^9.2.1","snazzy":"^9.0.0","ioredis":"^5.0.6","standard":"^16.0.4","release-it":"^14.12.5","typescript":"^4.6.2","semantic-release":"^19.0.2","@semantic-release/git":"^10.0.1","safe-stable-stringify":"^2.3.1","@semantic-release/changelog":"^6.0.1","@semantic-release/commit-analyzer":"^9.0.2","@release-it/conventional-changelog":"^4.2.0"},"_npmOperationalInternal":{"tmp":"tmp/commands_2.0.0_1785240738373_0.465950373548889","host":"s3://npm-registry-packages-npm-production"},"readme":"# Redis Commands\n\nThis module exports all the commands that Redis supports.\n\n## Install\n\n```shell\n$ npm install @ioredis/commands\n```\n\n## Usage\n\n```js\nconst commands = require('@ioredis/commands');\n```\n\n`.list` is an array contains all the lowercased commands:\n\n```js\ncommands.list.forEach((command) => {\n  console.log(command);\n});\n```\n\n`.exists()` is used to check if the command exists:\n\n```js\ncommands.exists('set') // true\ncommands.exists('other-command') // false\n```\n\n`.hasFlag()` is used to check if the command has the flag:\n\n```js\ncommands.hasFlag('set', 'readonly') // false\n```\n\n`.getKeyIndexes()` is used to get the indexes of keys in the command arguments:\n\n```js\ncommands.getKeyIndexes('set', ['key', 'value']) // [0]\ncommands.getKeyIndexes('mget', ['key1', 'key2']) // [0, 1]\n```\n","publish_time":1785240738460,"_cnpm_publish_time":1785240738460,"dist-tags":{"latest":"2.4.0"}}