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

nanostores

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nanostores - npm Package Compare versions

Comparing version 0.10.0 to 0.10.1

10

lifecycle/index.d.ts

@@ -19,5 +19,6 @@ import type { MapStore, Store, StoreValue } from '../map/index.js'

type AtomNotifyPayload<Shared> = {
type AtomNotifyPayload<Shared, SomeStore extends Store> = {
abort(): void
changed: undefined
oldValue: StoreValue<SomeStore>
shared: Shared

@@ -30,5 +31,6 @@ }

changed: keyof StoreValue<SomeStore>
oldValue: StoreValue<SomeStore>
shared: Shared
}
| AtomNotifyPayload<Shared>
| AtomNotifyPayload<Shared, SomeStore>

@@ -68,3 +70,3 @@ /**

/**
* Add listener to notifing about store changes.
* Add listener to notifying about store changes.
*

@@ -85,3 +87,3 @@ * You can communicate between listeners by `payload.shared`

? MapNotifyPayload<Shared, SomeStore>
: AtomNotifyPayload<Shared>
: AtomNotifyPayload<Shared, SomeStore>
) => void

@@ -88,0 +90,0 @@ ): () => void

6

lifecycle/index.js

@@ -101,3 +101,3 @@ import { clean } from '../clean-stores/index.js'

let originNotify = $store.notify
$store.notify = (_, changed) => {
$store.notify = (oldValue, changed) => {
let isAborted

@@ -108,4 +108,4 @@ let abort = () => {

runListeners({ abort, changed })
if (!isAborted) return originNotify(changed)
runListeners({ abort, changed, oldValue })
if (!isAborted) return originNotify(oldValue, changed)
}

@@ -112,0 +112,0 @@ return () => {

{
"name": "nanostores",
"version": "0.10.0",
"version": "0.10.1",
"description": "A tiny (286 bytes) state manager for React/Preact/Vue/Svelte with many atomic tree-shakable stores",

@@ -5,0 +5,0 @@ "keywords": [

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