Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/darky/effector-storify
Effector utils for storify Effect/Event
https://github.com/darky/effector-storify
effect effector event store storify tools utils
Last synced: about 1 month ago
JSON representation
Effector utils for storify Effect/Event
- Host: GitHub
- URL: https://github.com/darky/effector-storify
- Owner: darky
- License: mit
- Created: 2021-11-20T11:02:54.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-11-21T13:11:18.000Z (about 3 years ago)
- Last Synced: 2024-01-26T07:03:03.085Z (11 months ago)
- Topics: effect, effector, event, store, storify, tools, utils
- Language: TypeScript
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# effector-storify
[Effector](https://effector.dev/) utils for storify Effect/Event
## API
#### fx$last
```typescript
const fx = fx$last(createEffect(x => x));
fx(0);
fx(1);
fx.$last.getState(); // 1
```#### ev$last
```typescript
const ev = ev$last(createEvent());
ev(0);
ev(1);
ev.$last.getState(); // 1
```#### fx$all
```typescript
const fx = fx$all(createEffect(x => x));
fx(0);
fx(1);
fx.$all.getState(); // [0, 1]
```#### ev$all
```typescript
const ev = ev$all(createEvent());
ev(0);
ev(1);
ev.$all.getState(); // [0, 1]
```#### fx$flatAll
```typescript
const fx = fx$flatAll(createEffect((x) => [x]));
fx(0);
fx(1);
fx.$flatAll.getState(); // [0, 1]
```#### ev$flatAll
```typescript
const ev = ev$flatAll(createEvent());
ev([0]);
ev([1]);
ev.$flatAll.getState(); // [0, 1]
```## Related
- [effector-async-local-storage](https://github.com/darky/effector-async-local-storage) - Effector Domain based on AsyncLocalStorage
- [ts-fp-di](https://github.com/darky/ts-fp-di) - Tiny TypeScript functional dependency injection, based on Node.js AsyncLocalStorage