Socket
Socket
Sign inDemoInstall

lru

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lru

A simple O(1) LRU cache


Version published
Weekly downloads
30K
increased by4.95%
Maintainers
1
Weekly downloads
 
Created
Source

A simple LRU cache supporting O(1) set, get and eviction of old keys

Installation

$ npm install lru

Usage

var LRU = require('lru').LRU;

var cache = new LRU(10);

cache.set('foo', 'bar');
cache.get('foo'); //=> bar

Credits

A big thanks to Dusty Leary who finished the library.

FAQs

Package last updated on 01 Jul 2015

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