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

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

  • 0.1.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
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 18 Apr 2012

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