nanostores
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -23,10 +23,12 @@ import { clean } from '../clean-stores/index.js' | ||
setKey(key, newValue) { | ||
if (typeof newValue === 'undefined') { | ||
if (key in store.value) { | ||
delete store.value[key] | ||
if (store.value) { | ||
if (typeof newValue === 'undefined') { | ||
if (key in store.value) { | ||
delete store.value[key] | ||
store.notify(key) | ||
} | ||
} else if (store.value[key] !== newValue) { | ||
store.value[key] = newValue | ||
store.notify(key) | ||
} | ||
} else if (store.value[key] !== newValue) { | ||
store.value[key] = newValue | ||
store.notify(key) | ||
} | ||
@@ -33,0 +35,0 @@ }, |
{ | ||
"name": "nanostores", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "A tiny (152 bytes) state manager for React/Preact/Vue/Svelte with many atomic tree-shakable stores", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
40180
1026