Gathering detailed insights and metrics for small-store
Gathering detailed insights and metrics for small-store
Gathering detailed insights and metrics for small-store
Gathering detailed insights and metrics for small-store
idb-keyval
A super-simple-small keyval store built on top of IndexedDB
@smallstack/store
This library was generated with [Nx](https://nx.dev).
@smallstack/store-components
@solid-primitives/static-store
Primitives for creating small reactive objects that doesn't change their shape over time - don't need a proxy wrapper.
A small, immutable and framework agnostic state store using rxjs and immer with native typescript support.
npm install small-store
Typescript
Module System
Node Version
NPM Version
TypeScript (97.38%)
JavaScript (2.62%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
9 Stars
44 Commits
1 Forks
3 Watchers
2 Branches
1 Contributors
Updated on Jan 08, 2025
Latest Version
3.0.2
Package Id
small-store@3.0.2
Unpacked Size
42.34 kB
Size
7.43 kB
File Count
12
NPM Version
10.1.0
Node Version
20.9.0
Published on
Nov 24, 2023
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
A small, immutable, reactive and framework agnostic state store under 2KB powered by rxjs and immer with native typescript support. To be used with vanilla, react, preact, angular, vue or whatever you like.
1import { Actions, Store } from 'small-store'; 2 3// state declaration 4interface CounterState { 5 count: number; 6} 7 8// actions 9enum CounterAction { 10 Increment = 'increment', 11 Decrement = 'decrement' 12} 13 14// action functions 15const counterActions: Actions<CounterState, CounterAction> = { 16 [CounterAction.Increment]: () => state => { 17 state.count++; 18 return state; 19 }, 20 [CounterAction.Decrement]: () => state => { 21 state.count--; 22 return state; 23 } 24}; 25 26// the initial state 27const initialCounterState: CounterState = { 28 count: 0 29}; 30 31// creating the store 32const counterStore = new Store<CounterState, CounterAction>( 33 initialCounterState, 34 counterActions 35); 36 37// subscribing to the store's state 38counterStore.state$.subscribe(state => console.log(state)); 39 40// dispatching actions 41counterStore.dispatch(CounterAction.Increment); 42counterStore.dispatch(CounterAction.Increment); 43counterStore.dispatch(CounterAction.Decrement);
See details and more examples in the docs.
Visit simbo.codes/small-store to read the documentation and the examples.
Requirements: node.js >=14, yarn >=1.22
1# build using microbundle 2yarn build 3# watch and rebuild 4yarn build:watch 5# lint using prettier and eslint 6yarn lint 7# test using jest 8yarn test 9# watch and retest 10yarn test:watch 11# open coverage in default browser 12yarn coverage:open 13# check everything 14yarn preflight
Requirements: docker
1# pull slate image 2docker pull slatedocs/slate 3# serve docs on localhost:4567 4yarn docs:serve 5# build docs to ./docs-build 6yarn docs:build
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
8 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 1
Details
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
no effort to earn an OpenSSF best practices badge detected
Reason
no SAST tool detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-06-30
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