package.json
4.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
{
"_args": [
[
{
"raw": "redis-commands@^1.2.0",
"scope": null,
"escapedName": "redis-commands",
"name": "redis-commands",
"rawSpec": "^1.2.0",
"spec": ">=1.2.0 <2.0.0",
"type": "range"
},
"/Users/fzy/project/koa2_Sequelize_project/node_modules/redis"
]
],
"_from": "redis-commands@>=1.2.0 <2.0.0",
"_id": "redis-commands@1.3.1",
"_inCache": true,
"_location": "/redis-commands",
"_nodeVersion": "7.4.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/redis-commands-1.3.1.tgz_1485363355063_0.7909097610972822"
},
"_npmUser": {
"name": "bridgear",
"email": "ruben@bridgewater.de"
},
"_npmVersion": "4.0.5",
"_phantomChildren": {},
"_requested": {
"raw": "redis-commands@^1.2.0",
"scope": null,
"escapedName": "redis-commands",
"name": "redis-commands",
"rawSpec": "^1.2.0",
"spec": ">=1.2.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/redis"
],
"_resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.3.1.tgz",
"_shasum": "81d826f45fa9c8b2011f4cd7a0fe597d241d442b",
"_shrinkwrap": null,
"_spec": "redis-commands@^1.2.0",
"_where": "/Users/fzy/project/koa2_Sequelize_project/node_modules/redis",
"author": {
"name": "luin",
"email": "i@zihua.li",
"url": "http://zihua.li"
},
"bugs": {
"url": "https://github.com/NodeRedis/redis-commonds/issues"
},
"dependencies": {},
"description": "Redis commands",
"devDependencies": {
"chai": "^3.4.0",
"codeclimate-test-reporter": "^0.4.0",
"ioredis": "^2.0.0",
"istanbul": "^0.4.3",
"json-stable-stringify": "^1.0.0",
"mocha": "^3.0.0",
"snazzy": "^6.0.0",
"standard": "^8.0.0"
},
"directories": {},
"dist": {
"shasum": "81d826f45fa9c8b2011f4cd7a0fe597d241d442b",
"tarball": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.3.1.tgz"
},
"gitHead": "3c87f94d94fcf66ca0c77101a6d36fad32134326",
"homepage": "https://github.com/NodeRedis/redis-commonds",
"keywords": [
"redis",
"commands",
"prefix"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "bridgear",
"email": "ruben@bridgewater.de"
},
{
"name": "luin",
"email": "i@zihua.li"
}
],
"name": "redis-commands",
"optionalDependencies": {},
"readme": "# Redis Commands\n\n[](https://travis-ci.org/NodeRedis/redis-commands)\n[](https://codeclimate.com/github/NodeRedis/redis-commands)\n[](https://codeclimate.com/github/NodeRedis/redis-commands/coverage)\n\nThis module exports all the commands that Redis supports.\n\n## Install\n\n```shell\n$ npm install redis-commands\n```\n\n## Usage\n\n```javascript\nvar commands = require('redis-commands');\n```\n\n`.list` is an array contains all the lowercased commands:\n\n```javascript\ncommands.list.forEach(function (command) {\n console.log(command);\n});\n```\n\n`.exists()` is used to check if the command exists:\n\n```javascript\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```javascript\ncommands.hasFlag('set', 'readonly') // false\n```\n\n`.getKeyIndexes()` is used to get the indexes of keys in the command arguments:\n\n```javascript\ncommands.getKeyIndexes('set', ['key', 'value']) // [0]\ncommands.getKeyIndexes('mget', ['key1', 'key2']) // [0, 1]\n```\n\n## Acknowledgment\n\nThank [@Yuan Chuan](https://github.com/yuanchuan) for the package name. The original redis-commands is renamed to [@yuanchuan/redis-commands](https://www.npmjs.com/package/@yuanchuan/redis-commands).\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/NodeRedis/redis-commands.git"
},
"scripts": {
"build": "node tools/build",
"coverage": "node ./node_modules/istanbul/lib/cli.js cover --preserve-comments ./node_modules/mocha/bin/_mocha -- -R spec",
"coverage:check": "node ./node_modules/istanbul/lib/cli.js check-coverage --branch 100 --statement 100",
"lint": "standard --fix --verbose | snazzy",
"posttest": "npm run coverage && npm run coverage:check",
"pretest": "npm run lint",
"test": "mocha"
},
"version": "1.3.1"
}