{"_id":"@ioredis/commands@2.4.0","bugs":{"url":"https://github.com/ioredis/commands/issues"},"dist":{"shasum":"def856bfe7c0ac28ffa7924caf5fc0f125d5fc78","tarball":"http://registry-npm.ywwl.com/@ioredis/commands/download/@ioredis/commands-2.4.0.tgz","fileCount":6,"integrity":"sha512-fyu7ZM5RvtsYZ3pz4DFlPqSGB3aoVD9ir0vL6/TLtRo8EMuC7f0Z+qGBskDkUL/gJs5fzelxityZAfNNUCrVrQ==","signatures":[{"sig":"MEYCIQC5kNm5KPVnGA93vPuMHnlVquoHwir2GVFP6nVNiYumwgIhAKwf5WpBpcnmDqm/1S8b/71AJLte8lDma1VtN4wkX7rH","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGpRHEYAaLyCcEKtzlvu2DNrgMtEE6WGe2qnXr1MMpU2AiAY6ru4LKgzqEBUGdHN5eYbSiTxjVOBbFQhV0CT8A0bCg=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ioredis%2fcommands@2.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":117310,"size":8353,"noattachment":false,"key":"/@ioredis/commands/-/@ioredis/commands-2.4.0.tgz"},"main":"built/index.js","name":"@ioredis/commands","types":"./built/index.d.ts","author":{"url":"http://zihua.li","name":"Zihua Li","email":"i@zihua.li"},"gitHead":"e86245effec3548fe53ef63ae5e309bd2bcd6a9a","license":"MIT","scripts":{"gen":"node tools/build","lint":"standard --fix --verbose | snazzy","test":"mocha","build":"rm -rf built && tsc","pretest":"npm run lint"},"version":"2.4.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"8fde7774-1762-4b8c-9cbf-6b39f9c37218"}},"homepage":"https://github.com/ioredis/commands","keywords":["redis","commands","prefix"],"repository":{"url":"git+https://github.com/ioredis/commands.git","type":"git"},"_npmVersion":"11.21.0","description":"Redis commands","directories":{},"maintainers":[{"name":"ioredis-robot","email":"ioredis-robot@zihua.li"},{"name":"pavelpashov","email":"pavel.pashov@redis.com"},{"name":"dmaier-redislabs","email":"david.maier@redis.com"},{"name":"nkaradzhov","email":"nkaradzhov89@gmail.com"}],"_nodeVersion":"24.22.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.6","mocha":"11.7.6","snazzy":"^9.0.0","ioredis":"5.11.1","standard":"^16.0.4","typescript":"^5.3.3","@types/node":"^20.11.16","semantic-release":"25.0.5","@semantic-release/git":"10.0.1","safe-stable-stringify":"^2.3.1","@semantic-release/changelog":"6.0.3","@semantic-release/commit-analyzer":"13.0.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/commands_2.4.0_1794483957192_0.4895674712544241"},"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":1794483957294,"_cnpm_publish_time":1794483957294,"dist-tags":{"latest":"2.4.0"}}