@algolia/cache-browser-local-storage
Advanced tools
Comparing version 4.0.0-beta.8 to 4.0.0-beta.9
@@ -19,5 +19,7 @@ 'use strict'; | ||
function createBrowserLocalStorageCache(version, logger = createNullLogger(), storage = window.localStorage) { | ||
function createBrowserLocalStorageCache(options) { | ||
/* eslint-disable functional/immutable-data, no-param-reassign, functional/no-try-statement */ | ||
const namespaceKey = `algoliasearch-client-js-${version}`; | ||
const storage = options.storage || window.localStorage; | ||
const logger = options.logger || createNullLogger(); | ||
const namespaceKey = `algoliasearch-client-js-${options.version}`; | ||
const debugMessage = 'LocalStorage is not available or json could not be decoded.'; | ||
@@ -24,0 +26,0 @@ // eslint-disable-next-line functional/prefer-readonly-type |
import { Cache } from '@algolia/cache-common'; | ||
import { Logger } from '@algolia/logger-common'; | ||
export declare function createBrowserLocalStorageCache(version: string, logger?: Logger, storage?: Storage): Cache; | ||
export declare type BrowserLocalStorageOptions = { | ||
readonly version: string; | ||
readonly logger?: Logger; | ||
readonly storage?: Storage; | ||
}; | ||
export declare function createBrowserLocalStorageCache(options: BrowserLocalStorageOptions): Cache; | ||
export { } |
@@ -15,5 +15,7 @@ function createNullLogger() { | ||
function createBrowserLocalStorageCache(version, logger = createNullLogger(), storage = window.localStorage) { | ||
function createBrowserLocalStorageCache(options) { | ||
/* eslint-disable functional/immutable-data, no-param-reassign, functional/no-try-statement */ | ||
const namespaceKey = `algoliasearch-client-js-${version}`; | ||
const storage = options.storage || window.localStorage; | ||
const logger = options.logger || createNullLogger(); | ||
const namespaceKey = `algoliasearch-client-js-${options.version}`; | ||
const debugMessage = 'LocalStorage is not available or json could not be decoded.'; | ||
@@ -20,0 +22,0 @@ // eslint-disable-next-line functional/prefer-readonly-type |
{ | ||
"name": "@algolia/cache-browser-local-storage", | ||
"version": "4.0.0-beta.8", | ||
"version": "4.0.0-beta.9", | ||
"private": false, | ||
@@ -16,4 +16,4 @@ "description": "Promise-based cache library for browser using local storage.", | ||
"dependencies": { | ||
"@algolia/cache-common": "4.0.0-beta.8" | ||
"@algolia/cache-common": "4.0.0-beta.9" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6250
161
+ Added@algolia/cache-common@4.0.0-beta.9(transitive)
- Removed@algolia/cache-common@4.0.0-beta.8(transitive)