1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.hset = hset;
|
7 | function hset(key, hashKey, hashVal) {
|
8 | if (!this.data.has(key)) {
|
9 | this.data.set(key, {});
|
10 | }
|
11 |
|
12 | var reply = 1;
|
13 | var hash = this.data.get(key);
|
14 |
|
15 | if ({}.hasOwnProperty.call(hash, hashKey)) {
|
16 | reply = 0;
|
17 | }
|
18 |
|
19 | hash[hashKey] = hashVal;
|
20 |
|
21 | this.data.set(key, hash);
|
22 |
|
23 | return reply;
|
24 | } |
\ | No newline at end of file |