New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

immutable-cache

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

immutable-cache

Immutable.js enabled caching

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
7
75%
Maintainers
1
Weekly downloads
 
Created
Source

Immutable Cache

Configurable cache, based on immutable.js.

Example

import {Cache} from 'immutable-cache';

let cache = new Cache({maxSize: 100});

// cache key 'key' with value 'value'
cache = cache.set('key', 'value');

// check if key is cached
cache.has('key'); // true
cache.has('other-key'); // false

cache.get('key'); // 'value'
cache.get('other-key'); // undefined

Options

NameDescription
maxSizemaximum number of keys stored in cache

License

Immutable-Cache is freely distributable under the terms of the MIT license.

Keywords

immutable

FAQs

Package last updated on 13 Feb 2018

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