Socket
Socket
Sign inDemoInstall

redux-state-branch

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-state-branch - npm Package Compare versions

Comparing version 0.0.40 to 0.0.41

37

dist/index.d.ts

@@ -51,7 +51,7 @@ interface AnyAction<T = any> {

/** Get all items */
all<StateT>(state: StateT): AnyItem[];
all<StateT>(state: StateT): ItemT[];
/** Get an item by id */
byId<StateT>(state: StateT, id?: string | null): AnyItem | undefined;
byId<StateT>(state: StateT, id?: string | null): ItemT | undefined;
/** Get an items that meet a filter condition */
where<StateT>(state: StateT, condition: (item: ItemT) => boolean): AnyItem[];
where<StateT>(state: StateT, condition: (item: ItemT) => boolean): ItemT[];
/** Get the top level meta content */

@@ -96,2 +96,6 @@ meta<StateT>(state: StateT): State<any>;

};
declare type ActionClassReturn<ItemT> = {
type: string;
items: PartialWithId<ItemT>[];
};
export declare class Actions<ItemT extends AnyItem, BranchStateT extends State<ItemT> = State<ItemT>> {

@@ -105,30 +109,15 @@ protected branchName: string;

/** Create an item */
create(items?: ItemsT<ItemT> | undefined, typeSuffix?: string | undefined): {
type: string;
items: PartialWithId<AnyItem>[];
};
create(items?: ItemsT<ItemT> | undefined, typeSuffix?: string | undefined): ActionClassReturn<ItemT>;
/** Update an item */
update(items: ItemsT<ItemT>, typeSuffix?: string | undefined): {
type: string;
items: PartialWithId<AnyItem>[];
};
update(items: ItemsT<ItemT>, typeSuffix?: string | undefined): ActionClassReturn<ItemT>;
/** Remove an item */
remove(items: string | ItemsT<ItemT> | string[], typeSuffix?: string | undefined): {
type: string;
items: PartialWithId<AnyItem>[];
};
remove(items: string | ItemsT<ItemT> | string[], typeSuffix?: string | undefined): ActionClassReturn<ItemT>;
/** DEPRECATED, Use remove instead */
delete(items: string | ItemsT<ItemT> | string[], typeSuffix?: string | undefined): {
type: string;
items: PartialWithId<AnyItem>[];
};
delete(items: string | ItemsT<ItemT> | string[], typeSuffix?: string | undefined): ActionClassReturn<ItemT>;
/** Replace an item */
replace(items: ItemsT<ItemT>, typeSuffix?: string | undefined): {
type: string;
items: PartialWithId<AnyItem>[];
};
replace(items: ItemsT<ItemT>, typeSuffix?: string | undefined): ActionClassReturn<ItemT>;
/** Set meta content */
setMeta(meta: Partial<BranchStateT>, typeSuffix?: string | undefined): {
type: string;
meta: Partial<State<any>>;
meta: Partial<BranchStateT>;
};

@@ -135,0 +124,0 @@ /** Reset branch to initial state */

@@ -84,2 +84,3 @@ "use strict";

Selectors.prototype.meta = function (state) {
// bug: cant cast this output as BranchStateT
return this.methods.meta(state);

@@ -86,0 +87,0 @@ };

{
"name": "redux-state-branch",
"version": "0.0.40",
"version": "0.0.41",
"private": false,

@@ -5,0 +5,0 @@ "description": "A redux wrapper for sane people.",

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