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

nullsession

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nullsession - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

5

CHANGELOG.md
### 0.1.0
- /dev/null equivalent for connect-session
- /dev/null equivalent for connect-session
### 0.1.1
- adding empty cookie object in get api

15

lib/nullstore.js

@@ -26,4 +26,9 @@ 'use strict';

NullStore.prototype.get = function get(id, callback) {
//return empty object
callback(null, {});
var cookie = {
path: '/',
httpOnly: true,
maxAge: null
};
//return empty object with cookie object
callback(null, {cookie: cookie});
};

@@ -39,4 +44,6 @@

NullStore.prototype.set = function set(id, session, callback) {
//return empty object
callback(null, {});
session = session || {};
//return empty session object
callback(null, session);
};

@@ -43,0 +50,0 @@

@@ -7,4 +7,5 @@ 'use strict';

module.exports = function (settings) {
settings = settings || {};
settings.store = new NullStore(settings);
return session(settings);
};
{
"name": "nullsession",
"version": "0.1.0",
"version": "0.1.1",
"description": "/dev/null equivalent for connect-session",

@@ -5,0 +5,0 @@ "main": "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