🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

csrkey-cache

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csrkey-cache

cache wrapper that generates its own cryptographically secure random keys. wraps lru-cache by default. ES5. TypeScript support. 582 bytes gzip.

latest
Source
npmnpm
Version
1.1.4
Version published
Maintainers
1
Created
Source

csrkey-cache Join the chat at https://gitter.im/ZenyWay/csrkey-cache

NPM build status coverage status Dependency Status

a cache wrapper that generates its own cryptographically secure random keys.

by default, this module wraps lru-cache.

ES5. TypeScript support. 582 bytes gzip.

EXAMPLE

import getCache from 'csrkey-cache'
const cache = getCache() // use lru-cache with { max: 1024, maxAge: 15 * 60 * 1000 } defaults

const key = cache.set('Rob says wow!')
cache.has(key) // true
cache.get(key) // 'Rob says wow!'
cache.del(key)
cache.has(key) // false

API

ES5 and Typescript compatible. coded in Typescript 3, transpiled to ES5.

main export is the minified version. if required, e.g. for development in JS without type checks from type declarations, import resolve-call/index.js instead, which adds argument type assertion when NODE_ENV !== 'production'.

for a detailed specification of the API, run the unit tests in your browser.

note that lru-cache is the cache wrapped by default.

CONTRIBUTING

see the contribution guidelines

LICENSE

Copyright 2018 Stéphane M. Catala

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and Limitations under the License.

Keywords

cache

FAQs

Package last updated on 17 Aug 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