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

lru-cache

Package Overview
Dependencies
Maintainers
1
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lru-cache - npm Package Compare versions

Comparing version 7.7.1 to 7.7.2

17

index.js

@@ -276,7 +276,14 @@ const perf = typeof performance === 'object' && performance &&

this.requireSize = (k, v, size, sizeCalculation) => {
if (sizeCalculation && !size) {
size = sizeCalculation(v, k)
}
if (!isPosInt(size)) {
throw new TypeError('size must be positive integer')
if (sizeCalculation) {
if (typeof sizeCalculation !== 'function') {
throw new TypeError('sizeCalculation must be a function')
}
size = sizeCalculation(v, k)
if (!isPosInt(size)) {
throw new TypeError('sizeCalculation return invalid (expect positive integer)')
}
} else {
throw new TypeError('invalid size value (must be positive integer)')
}
}

@@ -563,3 +570,3 @@ return size

}
const ac = new AbortController()
const ac = new AC()
const fetchOpts = {

@@ -566,0 +573,0 @@ signal: ac.signal,

{
"name": "lru-cache",
"description": "A cache object that deletes the least-recently-used items.",
"version": "7.7.1",
"version": "7.7.2",
"author": "Isaac Z. Schlueter <i@izs.me>",

@@ -25,3 +25,3 @@ "keywords": [

"benchmark": "^2.1.4",
"clock-mock": "^1.0.3",
"clock-mock": "^1.0.4",
"size-limit": "^7.0.8",

@@ -28,0 +28,0 @@ "tap": "^15.1.6"

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