Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

safe-memory-cache

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

safe-memory-cache - npm Package Compare versions

Comparing version
1.2.1
to
1.2.3
+2
-2
map.js

@@ -29,3 +29,3 @@ function createMem(number, limit) {

set: function set(key, value) {
if (!(key in this.buckets[0])) {
if (!(this.buckets[0].has(key))) {
this.size++;

@@ -41,3 +41,3 @@ if (this.max && this.size >= Math.ceil(this.max / this.buckets.length)) {

for (var i = 0; i < this.buckets.length; i++) {
if (key in this.buckets[i]) {
if (this.buckets[i].has(key)) {
//todo: this should be configurable

@@ -44,0 +44,0 @@ if (i) {

{
"name": "safe-memory-cache",
"version": "1.2.1",
"version": "1.2.3",
"description": "Secure and size-limited in-memory cache for Node.js and browsers",

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