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

connect-lowdb

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-lowdb - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

35

lib/connect-lowdb.js

@@ -73,2 +73,37 @@ const lowdbStore = (session) => {

}
touch(sid, session, cb) {
this.set(sid, session, cb);
}
all(cb) {
this.db.read()
.then(() => {
this.db.data ||= { sessions: [] };
this.db.data.sessions ||= [];
cb(null, this.db.data.sessions);
})
.catch((err) => { cb(err); });;
}
clear(cb) {
this.db.data ||= { sessions: [] };
this.db.data.sessions = [];
this.db.write()
.then(() => { cb(null); })
.catch((err) => { cb(err); });;
}
length(cb) {
this.db.read()
.then(() => {
this.db.data ||= { sessions: [] };
this.db.data.sessions ||= [];
cb(null, this.db.data.sessions.length);
})
.catch((err) => { cb(err); });;
}
}

@@ -75,0 +110,0 @@

2

package.json
{
"name": "connect-lowdb",
"version": "1.0.1",
"version": "2.0.0",
"description": "lowdb session store for Connect",

@@ -5,0 +5,0 @@ "exports": "./index.js",

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