Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

misc refactoring

  • Loading branch information...
commit 1e4286c1f4b99d2e4df9c93e5082b944440ccae4 1 parent 9cae183
@tj authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/commands/keys.js
View
7 lib/commands/keys.js
@@ -58,12 +58,13 @@ exports.randomkey = function(client){
(exports.del = function(client, key){
// TODO: varg
+ // TODO: del count ?
key = utils.string(key);
- if (this.data[key]) {
+ if (null == this.data[key]) {
+ client.int(0);
+ } else {
this.data[key] = null;
client.int(1);
- } else {
- client.int(0);
}
}).mutates = true;
Please sign in to comment.
Something went wrong with that request. Please try again.