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

authdb

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

authdb - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

28

authdb.js

@@ -0,1 +1,3 @@

'use strict';
var redis = require("redis");

@@ -8,7 +10,9 @@

var Client = function(options) {
this.host = options.host || "127.0.0.1";
this.port = options.port || 6379;
this.redisClient = redis.createClient(this.port, this.host, {
no_ready_check: true
});
// Can pass in redisClient directly, or we create our own
// using options.host/options.port with defaults.
this.redisClient = options.redisClient || redis.createClient(
options.port || 6379,
options.host || "127.0.0.1",
{no_ready_check: true}
);

@@ -53,10 +57,16 @@ return this;

Client.prototype.removeAccount = function(token, cb) {
this.redisClient.del(token, cb);
};
// Module object
var authdb = {
createClient: function(options) {
return new Client(options);
}
var authdb = function (options) {
// Don't fail on missing options.
return new Client(options || {});
};
// Backwrads compatible.
authdb.createClient = authdb;
// Export the module object.
module.exports = authdb;
{
"name": "authdb",
"version": "0.2.1",
"version": "0.3.0",
"description": "database of authenticated users",

@@ -9,4 +9,4 @@ "main": "authdb.js",

"dependencies": {
"redis": "~0.12.1"
"redis": "^2.6.2"
}
}
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