New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

svelte-local-storage-store

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-local-storage-store - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

src/.index.js.swp

4

dist/index.js

@@ -79,3 +79,3 @@ (function (global, factory) {

const {subscribe, set} = store;
const json = localStorage.getItem(key);
const json = process.browser ?? localStorage.getItem(key);

@@ -88,3 +88,3 @@ if (json) {

set(value) {
localStorage.setItem(key, JSON.stringify(value));
process.browser ?? localStorage.setItem(key, JSON.stringify(value));
set(value);

@@ -91,0 +91,0 @@ },

{
"name": "svelte-local-storage-store",
"version": "0.1.0",
"version": "0.1.1",
"svelte": "src/index.js",

@@ -16,3 +16,3 @@ "module": "dist/index.mjs",

"eslint-plugin-svelte3": "^2.7.3",
"rollup": "^1.20.0",
"rollup": "^2.18.0",
"rollup-plugin-svelte": "^5.0.0",

@@ -19,0 +19,0 @@ "svelte": "^3.0.0"

@@ -43,3 +43,2 @@ # svelte-local-storage-store

- [ ] Support multiple tabs / capture event when localStorage changes
- [ ] Support sapper, when no `process.browser` use initial value
- [ ] Add tests

@@ -46,0 +45,0 @@

@@ -6,3 +6,3 @@ import {writable as internal, get} from 'svelte/store'

const {subscribe, set} = store
const json = localStorage.getItem(key)
const json = process.browser ?? localStorage.getItem(key)

@@ -15,3 +15,3 @@ if (json) {

set(value) {
localStorage.setItem(key, JSON.stringify(value))
process.browser ?? localStorage.setItem(key, JSON.stringify(value))
set(value)

@@ -18,0 +18,0 @@ },

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