Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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