Socket
Socket
Sign inDemoInstall

@algolia/cache-in-memory

Package Overview
Dependencies
Maintainers
61
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@algolia/cache-in-memory - npm Package Compare versions

Comparing version 4.0.0-beta.11 to 4.0.0-beta.12

3

dist/cache-in-memory.cjs.js

@@ -6,3 +6,2 @@ 'use strict';

function createInMemoryCache(options = { serializable: true }) {
/* eslint-disable functional/immutable-data, functional/no-let, functional/prefer-readonly-type */
const cache = {};

@@ -22,2 +21,3 @@ return {

set(key, value) {
// eslint-disable-next-line functional/immutable-data
cache[JSON.stringify(key)] = options.serializable ? JSON.stringify(value) : value;

@@ -27,2 +27,3 @@ return Promise.resolve(value);

delete(key) {
// eslint-disable-next-line functional/immutable-data
delete cache[JSON.stringify(key)];

@@ -29,0 +30,0 @@ return Promise.resolve();

@@ -6,2 +6,5 @@ import { Cache } from '@algolia/cache-common';

export declare type InMemoryCacheOptions = {
/**
* If keys and values should be serialized using `JSON.stringify`.
*/
readonly serializable?: boolean;

@@ -8,0 +11,0 @@ };

function createInMemoryCache(options = { serializable: true }) {
/* eslint-disable functional/immutable-data, functional/no-let, functional/prefer-readonly-type */
const cache = {};

@@ -17,2 +16,3 @@ return {

set(key, value) {
// eslint-disable-next-line functional/immutable-data
cache[JSON.stringify(key)] = options.serializable ? JSON.stringify(value) : value;

@@ -22,2 +22,3 @@ return Promise.resolve(value);

delete(key) {
// eslint-disable-next-line functional/immutable-data
delete cache[JSON.stringify(key)];

@@ -24,0 +25,0 @@ return Promise.resolve();

{
"name": "@algolia/cache-in-memory",
"version": "4.0.0-beta.11",
"version": "4.0.0-beta.12",
"private": false,

@@ -16,4 +16,4 @@ "description": "Promise-based cache library using memory.",

"dependencies": {
"@algolia/cache-common": "4.0.0-beta.11"
"@algolia/cache-common": "4.0.0-beta.12"
}
}
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