Gathering detailed insights and metrics for @ts-kit/state-container
Gathering detailed insights and metrics for @ts-kit/state-container
Gathering detailed insights and metrics for @ts-kit/state-container
Gathering detailed insights and metrics for @ts-kit/state-container
A set of packages to help explore ideas and learn
npm install @ts-kit/state-container
Typescript
Module System
Node Version
NPM Version
TypeScript (97.37%)
JavaScript (2.63%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
2 Stars
225 Commits
3 Watchers
55 Branches
1 Contributors
Updated on Nov 05, 2019
Latest Version
3.0.0-alpha.14
Package Id
@ts-kit/state-container@3.0.0-alpha.14
Unpacked Size
59.82 kB
Size
8.51 kB
File Count
45
NPM Version
lerna/3.18.3/node@v12.13.0+x64 (darwin)
Node Version
12.13.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
8
An idea for dispatching actions in an asynchronous manner. (Similar to Thunk)
1npm i @ts-kit/state-container
1import { StateContainer, Action } from '@ts-kit/state-container'; 2 3const enum CounterTodoType { Increment, Decrement } 4 5class Increment implements Action { 6 readonly type = CounterTodoType.Increment 7} 8 9class Decrement implements Action { 10 readonly type = CounterTodoType.Decrement 11} 12 13const container = new StateContainer((state: number, action: Increment | Decrement): number => { 14 switch(action.type) { 15 case CounterTodoType.Increment: 16 return state + 1; 17 18 case CounterTodoType.Decrement: 19 return state - 1; 20 } 21}, 0);
1// A raw action 2container.value.subscribe(console.log);
1// A raw action 2 3container.update(new Increment()); 4container.update(() => new Increment());
1// A Promise that resolves to an action 2 3container.update(fetch('/my-api').then(() => new Increment())); 4container.update(() => fetch('/my-api').then(() => new Increment()));
1// An Observable that resolves to an action 2 3container.update(of('Hello').pipe(map(() => new Increment()))); 4container.update(() => of('Hello').pipe(map(() => new Increment())));
Async Dispatcher |
Async State |
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no SAST tool detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
104 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More