Socket
Socket
Sign inDemoInstall

lru

Package Overview
Dependencies
0
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    lru

A simple O(1) LRU cache


Version published
Maintainers
1
Created

Readme

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

FAQs

Last updated on 06 Feb 2012

Did you know?

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc