Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

patronum

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

patronum - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

_/build.js

1

condition/index.js

@@ -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();

7

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc