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

lru.min

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lru.min - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

package.json
{
"name": "lru.min",
"version": "0.2.0",
"version": "0.2.1",
"description": "🔥 An extremely fast and efficient LRU cache for JavaScript (Browser compatible) — 4.8KB.",

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

@@ -8,4 +8,2 @@ <h1 align="center">lru.min</h1>

>
## Why

@@ -76,11 +74,11 @@

const LRU = createLRU({ max: 1000 });
const LRU = createLRU({ max: 150_000 });
```
Also, you can set a callback for every deletion:
Also, you can set a callback for every deletion/eviction:
```ts
const LRU = createLRU({
max: 1000,
dispose: (key, value) => {
max: 150_000,
onEviction: (key, value) => {
// do something

@@ -132,3 +130,3 @@ },

```ts
LRU.evict(10);
LRU.evict(1000);
```

@@ -141,3 +139,3 @@

```ts
LRU.resize(500);
LRU.resize(50_000);
```

@@ -267,4 +265,2 @@

[**lru-cache**](https://github.com/isaacs/node-lru-cache) `v11.x.x`
---

@@ -278,10 +274,16 @@

## Contributing
See the [**Contributing Guide**](https://github.com/wellwelwel/lru.min/blob/main/CONTRIBUTING.md) and please follow our [**Code of Conduct**](https://github.com/wellwelwel/lru.min/blob/main/CODE_OF_CONDUCT.md) 🚀
---
## Acknowledgements
> **lru.min** is based on the architecture and code of [**lru-cache**](https://github.com/isaacs/node-lru-cache) and [**quick-lru**](https://github.com/sindresorhus/quick-lru), simplifying their core concepts for enhanced performance and compatibility.
> **lru.min** is based and inspired on the architecture and code of both [**lru-cache**](https://github.com/isaacs/node-lru-cache) and [**quick-lru**](https://github.com/sindresorhus/quick-lru), simplifying their core concepts for enhanced performance and compatibility.
>
> For more comprehensive features such as **TTL** support, consider using and supporting them 🤝
- [@isaacs](https://github.com/isaacs) and [lru-cache](https://github.com/isaacs/node-lru-cache).
- [@sindresorhus](https://github.com/sindresorhus) and [quick-lru](https://github.com/sindresorhus/quick-lru).
- The architecture is mostly based on [@isaacs](https://github.com/isaacs) — [**lru-cache**](https://github.com/isaacs/node-lru-cache/blob/8f51d75351cbb4ac819952eb8e9f95eda00ef800/src/index.ts).
- Most of the methods names and its functionalities were inspired by [@sindresorhus](https://github.com/sindresorhus) — [**quick-lru**](https://github.com/sindresorhus/quick-lru/blob/a2262c65e1952539cb4d985a67c46363a780d234/index.js).
- [![Contributors](https://img.shields.io/github/contributors/wellwelwel/lru.min?label=Contributors)](https://github.com/wellwelwel/lru.min/graphs/contributors)

@@ -295,7 +297,1 @@

Copyright © 2024-present [Weslley Araújo](https://github.com/wellwelwel) and **lru.min** [contributors](https://github.com/wellwelwel/lru.min/graphs/contributors).
**lru-cache** is licensed under the [**ISC License**](https://github.com/isaacs/node-lru-cache/blob/main/LICENSE).<br />
Copyright © 2010-2023 Isaac Z. Schlueter and Contributors.
**quick-lru** is licensed under the [**MIT License**](https://github.com/sindresorhus/quick-lru/blob/main/license).<br />
Copyright © Sindre Sorhus.
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