This package is designed to utilize deductive reasoning in order to determine the metastate values around a data context.
- components must not manipulate metastate values directly
- event API (eg. store actions) dependencies must be mockable
- support
asyncValidation
and the synchronousvalidation
in the same method - implement cache
- explore and maybe implement
push
and/orpull
behavior - make distinct methods for "get" vs "fetch" where "get" can be satisfied by an existing state value
but "fetch" will always call a new read operation
- fetch, recover, obtain, access, procure, fetch, acquire, grab, collect, produce, provide
- query string controls for path
- instead of having an implicit path
something/all
we could usesomething/*?filter=value
- instead of having an implicit path
- transparent path aliases
- the source path would be the one that has the resources UID where as more specific path routes would be aliases for the source
- then the source will be updated regardless of the method in which the resource was fetched
Turns on debugging logs.
const { OpenState, logging } = require('openstate');
logging(); // show debug logs
- Developed using Node.js
v18.7.0
No build required. Vanilla JS only.
To run all tests with logging
make test-debug
make test-unit-debug
- Unit tests onlymake test-integration-debug
- Integration tests only
NOTE: remove
-debug
to run tests without logging