New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@zcorky/lru

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zcorky/lru

A tiny and fast Leat Recently Used(LRU) cache, written by typescript

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
291
increased by130.95%
Maintainers
1
Weekly downloads
 
Created
Source

lru

NPM version NPM quality Coverage Status Dependencies Build Status Known Vulnerabilities NPM download license issues

A tiny and fast Leat Recently Used(LRU) cache, written by typescript. Supports "expire" and "hits".

Install

$ npm install @zcorky/lru

Usage

const LRU = require('@zcorky/lru').lru;
// import LRU from '@zcorky/lru'; // ts or es6

const lru = new LRU(100);
lru.set(key, value);
lru.get(key);

// value2 will be expired after 5000ms
lru.set(key2, value2, { maxAge: 5000 });
// get key and update expired
lru.get(key2, { maxAge: 5000 });

// hits
lru.hits(); // { count, rate }

Relative Reposities

  • ylru: Add "expire", "allow set empty value" extends on hashlru.
  • flru: A tiny (215B) and fast Least Recently Used (LRU) cache.

License

MIT © Moeover

Keywords

FAQs

Package last updated on 22 Dec 2020

Did you know?

Socket

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.

Install

Related posts

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