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.6.0 to 0.6.1

8

build/types.d.ts

@@ -15,6 +15,6 @@ import { FC } from 'react';

declare type Will<T> = T | undefined;
declare type WillExpand<T> = ((p: T) => 0) extends ((p: Will<T>) => 0) ? [T] extends [Will<infer P>] ? P | undefined : T : T;
declare type WillExtract<T> = ((p: T) => 0) extends ((p: Will<T>) => 0) ? [T] extends [Will<infer P>] ? P : T : T;
declare type WillEnsure<T> = ((p: T) => 0) extends ((p: Will<T>) => 0) ? [T] extends [Will<infer P>] ? Will<P> : Will<T> : Will<T>;
declare type WillIf<T, R> = ((p: T) => 0) extends ((p: Will<T>) => 0) ? [T] extends [Will<infer P>] ? WillEnsure<R> : R : R;
declare type WillExpand<T> = [T] extends [Will<unknown>] ? ((p: T) => 0) extends (p: Will<infer P>) => 0 ? P | undefined : T : T;
declare type WillExtract<T> = [T] extends [Will<unknown>] ? ((p: T) => 0) extends (p: Will<infer P>) => 0 ? P : T : T;
declare type WillEnsure<T> = [T] extends [Will<unknown>] ? ((p: T) => 0) extends (p: Will<infer P>) => 0 ? Will<P> : Will<T> : Will<T>;
declare type WillIf<T, R> = [T] extends [Will<unknown>] ? ((p: T) => 0) extends (p: Will<infer P>) => 0 ? WillEnsure<R> : R : R;
declare type On = {

@@ -21,0 +21,0 @@ <T>(target: Re<Will<T>>, fn: (value: T, prev: WillExpand<Will<T>>) => void): void;

{
"name": "realar",
"version": "0.6.0",
"version": "0.6.1",
"description": "Advanced state manager for React",

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

},
"gitHead": "6a98fa261c63215e3beaffbfda91db17d052c8cf"
"gitHead": "61da982bca1c93e3d0aad7b237ecf24407586c0c"
}

@@ -88,15 +88,15 @@ # Realar

And you can use it together <sup>_[play on codesandbox](https://codesandbox.io/s/realar-readme-example-together-cppu6?file=/src/App.tsx)_</sup>
And you can use it together <sup>_[play on codesandbox](https://codesandbox.io/s/realar-readme-example-together-315r8?file=/src/App.tsx)_</sup>
```javascript
const counter = new Counter()
const store = value.from(() => counter.state)
const App = () => {
const state = useValue(() => store.val)
return <p>{state}
export const App = observe(() => (
<p>
{store.val}
<button onClick={counter.inc}>+</button>
</p>
}
))
```

@@ -164,6 +164,4 @@

+ [Multiparadigm state manager for React by ~2 kB.](https://dev.to/betula/multiparadigm-state-manager-for-react-by-2-kb-4kh1)
+ [The light decision for React state 👋](https://dev.to/betula/new-minimalistic-react-state-manager-3o39)
+ [State manager of dream](https://dev.to/betula/state-manager-of-dream-5766-temp-slug-158417?preview=4b030f68851211fd02704f12d7742ce193a8f9c893afd1e4249b88023e14d57b1e5a8a02c4aaa924f22beb44c69bba20617a0523e952120eb97ef344)
### Installation

@@ -170,0 +168,0 @@

@@ -57,6 +57,6 @@ import { FC } from 'react';

type Will<T> = T | undefined;
type WillExpand<T> = ((p: T) => 0) extends ((p: Will<T>) => 0) ? [T] extends [Will<infer P>] ? P | undefined : T : T;
type WillExtract<T> = ((p: T) => 0) extends ((p: Will<T>) => 0) ? [T] extends [Will<infer P>] ? P : T : T;
type WillEnsure<T> = ((p: T) => 0) extends ((p: Will<T>) => 0) ? [T] extends [Will<infer P>] ? Will<P> : Will<T> : Will<T>;
type WillIf<T, R> = ((p: T) => 0) extends ((p: Will<T>) => 0) ? [T] extends [Will<infer P>] ? WillEnsure<R> : R : R;
type WillExpand<T> = [T] extends [Will<unknown>] ? ((p: T) => 0) extends (p: Will<infer P>) => 0 ? P | undefined : T : T;
type WillExtract<T> = [T] extends [Will<unknown>] ? ((p: T) => 0) extends (p: Will<infer P>) => 0 ? P : T : T;
type WillEnsure<T> = [T] extends [Will<unknown>] ? ((p: T) => 0) extends (p: Will<infer P>) => 0 ? Will<P> : Will<T> : Will<T>;
type WillIf<T, R> = [T] extends [Will<unknown>] ? ((p: T) => 0) extends (p: Will<infer P>) => 0 ? WillEnsure<R> : R : R;

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