title: Using NPM `redis` package, .exists(...) always returns true. Why?
body: <p>I have a little Node.js project with Redis that is in development.  What I am currently seeing is that <code>client.exists(anything)</code> returns true, even when that key does not exist in the Redis store.  Here is some code to demonstrate what I am doing.</p>
  
  <pre><code>const key = 'k'
  const content = 'blah blah'
  client.rpush(key, content)
  </code></pre>
  
  <p>I run the above code and I stop.  Now, on the command line, I do the following:</p>
  
  <pre><code>&gt; redis-cli
  :6379&gt; exists k
  true
  :6379&gt; exists foo
  false
  </code></pre>
  
  <p>Awesome!  As expected.  Now, I run the following code back in Node.js:</p>
  
  <pre><code>const key = 'k'
  if(client.exists(key)) console.log('should print')
  if(client.exists('foo')) console.log('should not print')
  </code></pre>
  
  <p>Unfortunately, the result I'm getting in console output is:</p>
  
  <pre><code>should print
  should not print
  </code></pre>
  
  <p>Why is Redis in Node.js reporting that something exists when Redis on the CLI reports, as expected, that thing does not exist?</p>