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

storeon

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storeon - npm Package Compare versions

Comparing version 3.0.7 to 3.1.0

3

CHANGELOG.md
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/).
## 3.1
* Added third argument to event handler with store (by @octav47).
## 3.0.7

@@ -5,0 +8,0 @@ * Fixed `package.types` path.

3

index.d.ts

@@ -71,3 +71,4 @@ type DataTypes<Map, Key extends keyof Map> = Map extends never

state: State extends object ? Readonly<State> : State,
data: (Events & StoreonEvents<State, Events>)[Event]
data: (Events & StoreonEvents<State, Events>)[Event],
store: StoreonStore
) => Partial<State> | Promise<void> | null | void

@@ -74,0 +75,0 @@

@@ -15,3 +15,3 @@ let createStoreon = modules => {

events[event].forEach(i => {
let diff = events[event].includes(i) && i(state, data)
let diff = events[event].includes(i) && i(state, data, store)
if (diff && typeof diff.then !== 'function') {

@@ -18,0 +18,0 @@ changed = state = { ...state, ...diff }

{
"name": "storeon",
"version": "3.0.7",
"description": "Tiny (167 bytes) event-based Redux-like state manager for React and Preact",
"version": "3.1.0",
"description": "Tiny (185 bytes) event-based Redux-like state manager for React and Preact",
"keywords": [

@@ -6,0 +6,0 @@ "state",

@@ -9,3 +9,3 @@ # Storeon

* **Small.** 167 bytes (minified and gzipped). No dependencies.
* **Small.** 185 bytes (minified and gzipped). No dependencies.
It uses [Size Limit] to control size.

@@ -183,4 +183,4 @@ * **Fast.** It tracks what parts of state were changed and re-renders

An event listener accepts the current state as the first argument
and optional event object as the second.
An event listener accepts the current state as the first argument,
optional event object as the second and optional store object as the third.

@@ -187,0 +187,0 @@ So event listeners can be reducers as well. As in Redux’s reducers,

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