Comparing version 0.7.0 to 0.8.0
@@ -0,1 +1,2 @@ | ||
// @ts-nocheck | ||
const { is, guard, createEvent } = require('effector'); | ||
@@ -2,0 +3,0 @@ |
@@ -15,2 +15,3 @@ # Patronum/Debug | ||
import { createStore, createEvent, createEffect } from 'effector'; | ||
import { debug } from 'patronum/debug'; | ||
@@ -17,0 +18,0 @@ const event = createEvent(); |
{ | ||
"name": "patronum", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"description": "☄️ Effector utility library delivering modularity and convenience", | ||
"main": "index.js", | ||
"scripts": { | ||
@@ -9,3 +10,4 @@ "test": "jest", | ||
"format": "prettier --write \"./src/**/**.{ts,tsx,js,jsx,json}\"", | ||
"lint": "eslint ./" | ||
"lint": "eslint ./", | ||
"prepublishOnly": "node ./_/build.js" | ||
}, | ||
@@ -39,2 +41,3 @@ "files": ["*/*.js", "*/*.d.ts", "!*.test.js"], | ||
"eslint-plugin-unicorn": "^14.0.1", | ||
"globby": "^11.0.0", | ||
"husky": "3.1.0", | ||
@@ -41,0 +44,0 @@ "jest": "^25.4.0", |
@@ -13,2 +13,3 @@ # effecto patronum ✨ | ||
- [Throttle](#-throttle) | ||
- [Debug](#-debug) | ||
- [Reshape](#-reshape) | ||
@@ -18,2 +19,24 @@ - [Spread](#-spread) | ||
## Usage | ||
```bash | ||
npm install patronum | ||
# or | ||
yarn add patronum | ||
``` | ||
Import function by its name from `patronum`: | ||
```ts | ||
import { delay } from 'patronum/delay'; | ||
``` | ||
Also use can import it from index: | ||
> Be careful, with this method, all functions will be at your bundle | ||
```ts | ||
import { delay } from 'patronum'; | ||
``` | ||
## [🧁 Condition](/condition 'Documentation') | ||
@@ -96,2 +119,29 @@ | ||
## [🧁 Debug](/debug 'Documentation') | ||
```ts | ||
import { createStore, createEvent, createEffect } from 'effector'; | ||
import { debug } from 'patronum/debug'; | ||
const event = createEvent(); | ||
const effect = createEffect().use((payload) => | ||
Promise.resolve('result' + payload), | ||
); | ||
const $store = createStore(0) | ||
.on(event, (state, value) => state + value) | ||
.on(effect.done, (state) => state * 10); | ||
debug($store, event, effect); | ||
event(5); | ||
effect('demo'); | ||
// => [store] $store 1 | ||
// => [event] event 5 | ||
// => [store] $store 6 | ||
// => [effect] effect demo | ||
// => [effect] effect.done {"params":"demo", "result": "resultdemo"} | ||
// => [store] $store 60 | ||
``` | ||
## [🍰 Reshape](/reshape 'Documentation') | ||
@@ -98,0 +148,0 @@ |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
22361
28
244
216
20
1