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

reactive-box

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reactive-box - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

4

package.json
{
"name": "reactive-box",
"version": "0.3.0",
"version": "0.4.0",
"description": "Minimalistic, fast, and highly efficient reactivity",

@@ -49,3 +49,3 @@ "scripts": {

"homepage": "https://github.com/betula/reactive-box#readme",
"gitHead": "73c9bcbb36bfc167f35076755c15a826ee9b311c"
"gitHead": "52a8b5852df7306c92347d45e257d5203d3e9452"
}
declare function box<T>(
initialValue?: T,
onChange?: (currentValue?: T, previousValue?: T) => void,
comparer?: (value?: T, nextValue?: T) => boolean
comparer?: (value: T, nextValue: T) => boolean
): [() => T, (nextValue?: T) => void];

@@ -9,3 +9,3 @@

body: T,
comparer?: (value?: T, prevValue?: T) => boolean
comparer?: (value: T, nextValue: T) => boolean
): [T, () => void];

@@ -12,0 +12,0 @@

@@ -100,3 +100,3 @@ /**

try {
cache = body.call(last_context);
return body.call(last_context);
} finally {

@@ -107,5 +107,6 @@ context_node = stack;

const sel_node = [new Set(), new Set(), 0, () => {
let prev = cache;
run();
return !comparer(cache, prev);
let next = run();
return comparer(cache, next)
? false
: ((cache = next), true);
}];

@@ -117,3 +118,3 @@ return [

if (!sel_node[2]) {
run();
cache = run();
sel_node[2] = 1;

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