Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pirate

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pirate - npm Package Compare versions

Comparing version 1.0.0-alpha-07 to 1.0.0-alpha-08

VERSION

23

lib/redis-adapter.js

@@ -40,2 +40,3 @@ // Generated by CoffeeScript 1.9.0

function Adapter(_at_configuration) {
var k, v, _ref2;
this.configuration = _at_configuration;

@@ -47,2 +48,10 @@ this.configuration = merge(defaults, this.configuration);

}
this.options = {};
_ref2 = this.configuration;
for (k in _ref2) {
v = _ref2[k];
if (k !== "port" && k !== "host") {
this.options[k] = v;
}
}
}

@@ -54,3 +63,3 @@

var client;
return client = redis.createClient(_this.configuration.port, _this.configuration.host).on("ready", function() {
return client = redis.createClient(_this.configuration.port, _this.configuration.host, _this.options).on("ready", function() {
_this.log("RedisAdapter: Connected to Redis server @ " + _this.configuration.host + ":" + _this.configuration.port);

@@ -111,3 +120,7 @@ _this.client = liftAll(redis.RedisClient.prototype, liftCommands, client);

if (res != null) {
return JSON.parse(res);
if (this.adapter.options.return_buffers) {
return res;
} else {
return JSON.parse(res);
}
} else {

@@ -119,3 +132,7 @@ return null;

Collection.prototype.put = function(key, object) {
return this.adapter.client.hset(this.name, key, JSON.stringify(object));
if (this.adapter.options.return_buffers) {
return this.adapter.client.hset(this.name, key, object);
} else {
return this.adapter.client.hset(this.name, key, JSON.stringify(object));
}
};

@@ -122,0 +139,0 @@

9

package.json
{
"name": "pirate",
"version": "1.0.0-alpha-07",
"version": "1.0.0-alpha-08",
"description": "A simple key-value storage interface with adapters for different databases",

@@ -15,6 +15,7 @@ "main": "lib/index.js",

"devDependencies": {
"coffee-script": "^1.9.0"
"coffee-script": "^1.9.0",
"json": "^9.0.3"
},
"engines" : {
"node" : ">=0.11"
"engines": {
"node": ">=0.11"
},

@@ -21,0 +22,0 @@ "scripts": {

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