Socket
Socket
Sign inDemoInstall

fluxible-js

Package Overview
Dependencies
1
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.0.6 to 6.0.7

4

__tests__/unit/addObserver.spec.js

@@ -7,3 +7,3 @@ /** @format */

test('calls appropriate observer after update store', () => {
const store = new createStore({
const store = createStore({
value: 'testValue',

@@ -75,3 +75,3 @@ test1: 'test1',

test('can unsubscribe a listener', () => {
const store = new createStore({
const store = createStore({
initialStore: {

@@ -78,0 +78,0 @@ value: 'testValue',

@@ -5,3 +5,3 @@ /** @format */

const store = new createStore({
const store = createStore({
initialStore: {

@@ -8,0 +8,0 @@ test: 123

@@ -20,14 +20,14 @@ declare type AsyncPersist<StoreType> = {

};
export declare type Store<StoreType> = {
updateStore: (updatedStates: Partial<StoreType>) => void;
addObserver: (callback: (store: StoreType) => void, keys: Array<keyof StoreType>) => () => void;
addEvent: (targetEv: string, callback: (payload: any, store: StoreType, event: string) => void) => () => boolean;
addEvents: (events: Array<string>, callback: (payload: any, store: StoreType, event: string) => void) => () => void;
removeEvent: (event: string) => void;
removeEvents: (events: Array<string>) => void;
emitEvent: (event: string, payload?: any) => void;
emitEvents: (events: Array<string>, payload: any) => void;
store: StoreType;
export declare type FluxibleStore<StoreType> = {
readonly updateStore: (updatedStates: Partial<StoreType>) => void;
readonly addObserver: (callback: (store: StoreType) => void, keys: Array<keyof StoreType>) => () => void;
readonly addEvent: (targetEv: string, callback: (payload: any, store: StoreType, event: string) => void) => () => boolean;
readonly addEvents: (events: Array<string>, callback: (payload: any, store: StoreType, event: string) => void) => () => void;
readonly removeEvent: (event: string) => void;
readonly removeEvents: (events: Array<string>) => void;
readonly emitEvent: (event: string, payload?: any) => void;
readonly emitEvents: (events: Array<string>, payload: any) => void;
readonly store: Readonly<StoreType>;
};
export declare function createStore<StoreType>({ useJSON, initialStore, persist }: Config<StoreType>, initCallback?: () => void): Store<StoreType>;
export declare function createStore<StoreType>({ useJSON, initialStore, persist }: Config<StoreType>, initCallback?: () => void): FluxibleStore<StoreType>;
export {};
{
"name": "fluxible-js",
"version": "6.0.6",
"version": "6.0.7",
"description": "Smaller, faster, better state management system that supports asynchronicity and state persistence out of the box.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -13,3 +13,3 @@ ![npm](https://img.shields.io/npm/dt/fluxible-js) ![npm](https://img.shields.io/npm/dm/fluxible-js) ![npm](https://img.shields.io/npm/dw/fluxible-js)

[See demo](https://aprilmintacpineda.github.io/react-fluxible/). This demo is using [react-fluxible](https://github.com/aprilmintacpineda/react-fluxible).
https://user-images.githubusercontent.com/21032419/139810793-ba875041-133e-4087-b80f-a523213e974d.mp4

@@ -16,0 +16,0 @@ # Run me

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc