Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mirohq/design-system-use-local-storage

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mirohq/design-system-use-local-storage - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

13

dist/main.js

@@ -19,3 +19,3 @@ 'use strict';

console.error(
`[useLocalStorage] Error reading localStorage key \u201C${key}\u201D:`,
"[useLocalStorage] Error reading localStorage key \u201C".concat(key, "\u201D:"),
e

@@ -34,3 +34,3 @@ );

console.error(
`[useLocalStorage] Error setting localStorage key \u201C${key}\u201D:`,
"[useLocalStorage] Error setting localStorage key \u201C".concat(key, "\u201D:"),
e

@@ -48,3 +48,3 @@ );

console.error(
`[useLocalStorage] Error removing localStorage key \u201C${key}\u201D:`,
"[useLocalStorage] Error removing localStorage key \u201C".concat(key, "\u201D:"),
e

@@ -54,5 +54,9 @@ );

}
const configUseLocalStorage = ({ prefix }) => {
if (prefix !== void 0)
KEY_PREFIX = prefix;
};
function useLocalStorage(key, defaultValue, { prefix } = {}) {
const prefixedKey = react.useMemo(
() => `${prefix != null ? prefix : KEY_PREFIX}_${key}`,
() => "".concat(prefix != null ? prefix : KEY_PREFIX, "_").concat(key),
[prefix, key]

@@ -89,3 +93,4 @@ );

exports.configUseLocalStorage = configUseLocalStorage;
exports.useLocalStorage = useLocalStorage;
//# sourceMappingURL=main.js.map

@@ -15,3 +15,3 @@ import { useEventListener } from '@mirohq/design-system-use-event-listener';

console.error(
`[useLocalStorage] Error reading localStorage key \u201C${key}\u201D:`,
"[useLocalStorage] Error reading localStorage key \u201C".concat(key, "\u201D:"),
e

@@ -30,3 +30,3 @@ );

console.error(
`[useLocalStorage] Error setting localStorage key \u201C${key}\u201D:`,
"[useLocalStorage] Error setting localStorage key \u201C".concat(key, "\u201D:"),
e

@@ -44,3 +44,3 @@ );

console.error(
`[useLocalStorage] Error removing localStorage key \u201C${key}\u201D:`,
"[useLocalStorage] Error removing localStorage key \u201C".concat(key, "\u201D:"),
e

@@ -50,5 +50,9 @@ );

}
const configUseLocalStorage = ({ prefix }) => {
if (prefix !== void 0)
KEY_PREFIX = prefix;
};
function useLocalStorage(key, defaultValue, { prefix } = {}) {
const prefixedKey = useMemo(
() => `${prefix != null ? prefix : KEY_PREFIX}_${key}`,
() => "".concat(prefix != null ? prefix : KEY_PREFIX, "_").concat(key),
[prefix, key]

@@ -85,3 +89,3 @@ );

export { useLocalStorage };
export { configUseLocalStorage, useLocalStorage };
//# sourceMappingURL=module.js.map
interface Config {
prefix?: string;
}
declare const configUseLocalStorage: ({ prefix }: Config) => void;
declare function useLocalStorage<Value, InitValue extends (oldValue: Value) => Value = (oldValue: Value) => Value>(key: string, defaultValue: Value, { prefix }?: Config): [Value, (newValue: Value | InitValue) => void, () => void];
export { useLocalStorage };
export { configUseLocalStorage, useLocalStorage };
{
"name": "@mirohq/design-system-use-local-storage",
"version": "0.3.2",
"version": "0.3.3",
"description": "",

@@ -29,4 +29,4 @@ "author": "Miro",

"@mirohq/design-system-types": "^0.6.0",
"@mirohq/design-system-use-event": "^0.2.0",
"@mirohq/design-system-use-event-listener": "^0.3.0"
"@mirohq/design-system-use-event-listener": "^0.3.0",
"@mirohq/design-system-use-event": "^0.2.0"
},

@@ -33,0 +33,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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