Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "patronum", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "☄️ Effector utility library delivering modularity and convenience", | ||
@@ -11,3 +11,3 @@ "scripts": { | ||
}, | ||
"files": ["condition"], | ||
"files": ["*/*.js", "*/*.d.ts", "!*.test.js"], | ||
"repository": { | ||
@@ -14,0 +14,0 @@ "type": "git", |
@@ -7,6 +7,25 @@ # effecto patronum ✨ | ||
## Debounce | ||
## [✅ Condition](/condition) | ||
```ts | ||
import { createEvent } from 'effector'; | ||
import { condition } from 'patronum/condition'; | ||
const trigger = createEvent<string>(); | ||
const longString = createEvent<string>(); | ||
const shortString = createEvent<string>(); | ||
condition({ | ||
source: trigger, | ||
if: (string) => string.length > 8, | ||
then: longString, | ||
else: shortString, | ||
}); | ||
``` | ||
## 🧁 Debounce | ||
```ts | ||
import { createEvent } from 'effector'; | ||
import { createDebounce } from 'patronum/debounce'; | ||
@@ -29,3 +48,3 @@ | ||
## Throttle | ||
## 🧁 Throttle | ||
@@ -51,3 +70,3 @@ ```ts | ||
## Reshape | ||
## 🧁 Reshape | ||
@@ -71,3 +90,3 @@ ```ts | ||
## Spread | ||
## 🧁 Spread | ||
@@ -94,3 +113,3 @@ ```ts | ||
## SplitMap | ||
## 🧁 SplitMap | ||
@@ -118,20 +137,1 @@ ```ts | ||
``` | ||
## Condition | ||
```ts | ||
import { createEvent } from 'effector'; | ||
import { condition } from 'patronum/condition'; | ||
const trigger = createEvent<string>(); | ||
const longString = createEvent<string>(); | ||
const shortString = createEvent<string>(); | ||
condition({ | ||
source: trigger, | ||
if: (string) => string.length > 8, | ||
then: longString, | ||
else: shortString, | ||
}); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9890
6
49