Socket
Socket
Sign inDemoInstall

@kksiuda/http-session

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kksiuda/http-session - npm Package Compare versions

Comparing version 0.9.30 to 0.9.31

1

dist/http-session.d.ts

@@ -19,2 +19,3 @@ /// <reference types="node" />

invalidate: (error: string) => Promise<void>;
wasReleased: boolean;
}

@@ -21,0 +22,0 @@ export interface HttpSessionStatusData {

9

dist/http-session.js

@@ -123,6 +123,5 @@ "use strict";

getSessionObject() {
let sessionReleased = false;
const wrap = (fnName, fn, releaseAfter) => {
return (...args) => {
if (sessionReleased) {
if (sessionObject.wasReleased) {
throw new Error(`calling ${fnName} failed because session has already been released`);

@@ -134,7 +133,7 @@ }

if (releaseAfter)
sessionReleased = true;
sessionObject.wasReleased = true;
return fn(...args);
};
};
return {
const sessionObject = {
getParams: wrap('getParams', () => this.getParams()),

@@ -146,3 +145,5 @@ request: wrap('request', (options) => this.request(options)),

reportLockout: wrap('reportLockout', () => this.reportLockout(), true),
wasReleased: false,
};
return sessionObject;
}

@@ -149,0 +150,0 @@ logoutWrapper() {

{
"name": "@kksiuda/http-session",
"version": "0.9.30",
"version": "0.9.31",
"description": "Http session and cookies management",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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