
Security News
NIST Officially Stops Enriching Most CVEs as Vulnerability Volume Skyrockets
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.
This module allows you to store variables separate for separate sessions effectively and efficiently
Written in TypeScript, this module sstorer (or session storer), allows you to store variables separate for separate sessions effectively and efficiently... The storage is simply a JSON, with a sessionID as key (any pass key that differentiates two containers of storage), and another JSON that contains the variables, as the respective value. This module can be used in JavaScript and TypeScript projects
Here, we do not keep checking async whether the sessions have expired. Instead whenever a call comes to the storage, a check is done whether the session has expired or not. So, its extremely efficient. At the same time, you have to keep refreshing the session whenever you deem fit
Have nodeJS and NPM installed in your machine
Install the library from NPM and use it! The examples shown below will help get you started
npm i sstorer
TypeScript import
import sstorer = require("sstorer");
// or import * as sstorer from "sstorer";
JavaScript import
var sstorer = require("sstorer");
Examples
// Create the object that contains everything needed
// param 'duration' is the lifetime of each session in minutes
let store = sstorer.init(duration: number)
// Should you choose to change in between
store.setDuration(duration: number)
// Refreshes the timestamp on the session
store.refreshSession(sessionid: string): boolean
// Starts a new sesssion storage with the sessionid given
store.spawnSession(sessionid: string): void
// Kills the sesssion storage with the sessionid given
store.killSession(sessionid: string): void
// Tells you whether the session is active or not
store.isSessionActive(sessionid): boolean
// Inserts/Modifies a variable under the sessionid given, under the name paramName and the value paramValue
store.putVar(sessionid, paramName, paramVal): boolean
// Returns the value of the variable in the session storage
store.getVar(sessionid, paramName): any
// These are for saving and retrieving the data from files
store.dump(fname: string): boolean
store.load(fname: string): boolean
This project is licensed under the GNU LGPL V3 License - see the LICENSE.md file for details
FAQs
This module allows you to store variables separate for separate sessions effectively and efficiently
The npm package sstorer receives a total of 12 weekly downloads. As such, sstorer popularity was classified as not popular.
We found that sstorer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.