New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

then-redis

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

then-redis - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

spec/msetnx-spec.js

8

lib/commands.js

@@ -62,3 +62,3 @@ var _slice = Array.prototype.slice;

// Optionall accept a hash as the only argument to MSET.
// Optionally accept a hash as the only argument to MSET.
commands.mset = function (hash) {

@@ -69,2 +69,8 @@ var args = (typeof hash === 'object') ? appendHashToArray(hash, []) : _slice.call(arguments, 0);

// Optionally accept a hash as the only argument to MSETNX.
commands.msetnx = function (hash) {
var args = (typeof hash === 'object') ? appendHashToArray(hash, []) : _slice.call(arguments, 0);
return this.send('msetnx', args);
};
// Optionally accept a hash as the first argument to HMSET after the key.

@@ -71,0 +77,0 @@ commands.hmset = function (key, hash) {

3

package.json
{
"name": "then-redis",
"version": "0.1.0",
"version": "0.2.0",
"description": "A small, promise-based Redis client",

@@ -23,2 +23,3 @@ "main": "lib/index.js",

"redis",
"then",
"promise",

@@ -25,0 +26,0 @@ "promises"

@@ -15,3 +15,3 @@ then-redis

\* Except for `MSET`, `HMSET` and `HGETALL` which optionally accept/return hashes (i.e. JavaScript objects) for convenience.
\* `MSET`, `MSETNX`, `HMSET` and `HGETALL` optionally accept/return JavaScript objects for convenience in dealing with Redis' multi-key and hash APIs

@@ -92,2 +92,3 @@ Usage

$ redis-server --port 6379
$ npm install

@@ -94,0 +95,0 @@ $ npm test

@@ -5,3 +5,3 @@ require('./helper');

describe('when given a list of fields/values', function () {
it('sets all fields to the correct values', function () {
it('sets all keys to the correct values', function () {
return db.mset('a', 'one', 'b', 'two', 'c', 'three').then(function () {

@@ -16,3 +16,3 @@ return db.mget('a', 'b', 'c').then(function (values) {

describe('when given a hash', function () {
it('sets all fields to the correct values', function () {
it('sets all keys to the correct values', function () {
return db.mset({ a: 'one', b: 'two', c: 'three' }).then(function () {

@@ -19,0 +19,0 @@ return db.mget('a', 'b', 'c').then(function (values) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc