Comparing version 0.8.0 to 0.9.0
@@ -8,2 +8,3 @@ module.exports.condition = require('./condition'); | ||
module.exports.spread = require('./spread'); | ||
module.exports.status = require('./status'); | ||
module.exports.throttle = require('./throttle'); |
{ | ||
"name": "patronum", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"description": "☄️ Effector utility library delivering modularity and convenience", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,6 +10,10 @@ # effecto patronum ✨ | ||
- [Condition](#-condition) | ||
- [Debounce](#-debounce) | ||
- [Debug](#-debug) | ||
- [Delay](#-delay) | ||
- [Debounce](#-debounce) | ||
- [Status](#-status) | ||
- [Throttle](#-throttle) | ||
- [Debug](#-debug) | ||
--- | ||
- [Reshape](#-reshape) | ||
@@ -145,2 +149,19 @@ - [Spread](#-spread) | ||
## [🧁 Status](/status 'Documentation') | ||
```ts | ||
import { createEvent, createEffect } from 'effector'; | ||
import { status } from 'patronum/status'; | ||
const effect = createEffect().use(() => Promise.resolve(null)); | ||
const $status = status(effect); | ||
$status.watch((value) => console.log(`status: ${value}`)); | ||
// => status: "initial" | ||
effect(); | ||
// => status: "pending" | ||
// => status: "done" | ||
``` | ||
## [🍰 Reshape](/reshape 'Documentation') | ||
@@ -147,0 +168,0 @@ |
25411
31
261
237