node-redis icon indicating copy to clipboard operation
node-redis copied to clipboard

exists method always returns true

Open rahul opened this issue 14 years ago • 2 comments

var REDIS = require('redis')
var DB = REDIS.createClient()
console.log(DB.exists('some_key_not_already_in_db')) //prints true

Is there some other way of checking for existence?

rahul avatar Jul 05 '12 13:07 rahul

try DB.exists('some_key_not_already_in_db', console.log)

skenqbx avatar Jul 05 '12 13:07 skenqbx

Missed out on the callback.

Thank you!

rahul avatar Jul 05 '12 13:07 rahul