reactive-box
Advanced tools
Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "reactive-box", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Minimalistic, fast, and highly efficient reactivity", | ||
"scripts": { | ||
"bootstrap": "npm i", | ||
"publish": "lerna publish", | ||
"test": "jest", | ||
"format": "prettier -w src/** tests/**" | ||
"format": "prettier -w src/** tests/**", | ||
"test:perf:tree": "node ./tests/perf/tree.js" | ||
}, | ||
@@ -19,3 +19,4 @@ "main": "src/main.js", | ||
"lerna": "3.22.1", | ||
"prettier": "2.1.2" | ||
"prettier": "2.2.0", | ||
"simple-statistics": "7.3.2" | ||
}, | ||
@@ -48,3 +49,3 @@ "sideEffects": false, | ||
"homepage": "https://github.com/betula/reactive-box#readme", | ||
"gitHead": "c97d386107cd302a18b96a965b53a52fc9acd4b0" | ||
"gitHead": "3103ee90a455aadc4c78acd9b5b74a7c2d733591" | ||
} |
@@ -96,4 +96,3 @@ /** | ||
let last_context; | ||
const recalc = () => { | ||
let prev = cache; | ||
const run = () => { | ||
const stack = context_node; | ||
@@ -106,5 +105,8 @@ context_node = sel_node; | ||
} | ||
} | ||
const sel_node = [new Set(), new Set(), 0, () => { | ||
let prev = cache; | ||
run(); | ||
return !comparer(cache, prev); | ||
}; | ||
const sel_node = [new Set(), new Set(), 0, recalc]; | ||
}]; | ||
return [ | ||
@@ -115,9 +117,3 @@ function () { | ||
if (!sel_node[2]) { | ||
const stack = context_node; | ||
context_node = sel_node; | ||
try { | ||
cache = body.call(last_context); | ||
} finally { | ||
context_node = stack; | ||
} | ||
run(); | ||
sel_node[2] = 1; | ||
@@ -124,0 +120,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
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
8770
4
158