Socket
Socket
Sign inDemoInstall

realar

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

realar - npm Package Compare versions

Comparing version 0.4.30 to 0.4.31

4

package.json
{
"name": "realar",
"version": "0.4.30",
"version": "0.4.31",
"description": "React state manager",

@@ -88,3 +88,3 @@ "repository": {

},
"gitHead": "7c9e712659544f676aa1d32aa593cbd94148e00e"
"gitHead": "4cbe32d9b59f6e6f246e0f1ccd097d327e81e0e6"
}

@@ -97,34 +97,2 @@ # Realar

### Actions
The `action` allows you to trigger an event and delivers the functionality to subscribe to it anywhere in your application code.
```javascript
const add = action();
const [get, set] = box(1);
on(add, num => set(get() + num));
add(15);
console.log(get()); // 16
```
[Edit on RunKit](https://runkit.com/betula/6013af7649e8720019c9cf2a)
An action is convenient to use as a promise.
```javascript
const fire = action();
const listen = async () => {
for (;;) {
await fire; // await as a usual promise
console.log('Fire');
}
}
listen();
setInterval(fire, 500);
```
[Edit on RunKit](https://runkit.com/betula/601e3b0056b62d001bfa391b)
### Access visibility levels

@@ -179,2 +147,34 @@

### Actions
The `action` allows you to trigger an event and delivers the functionality to subscribe to it anywhere in your application code.
```javascript
const add = action();
const [get, set] = box(1);
on(add, num => set(get() + num));
add(15);
console.log(get()); // 16
```
[Edit on RunKit](https://runkit.com/betula/6013af7649e8720019c9cf2a)
An action is convenient to use as a promise.
```javascript
const fire = action();
const listen = async () => {
for (;;) {
await fire; // await as a usual promise
console.log('Fire');
}
}
listen();
setInterval(fire, 500);
```
[Edit on RunKit](https://runkit.com/betula/601e3b0056b62d001bfa391b)
### Core

@@ -181,0 +181,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