brisky-struct
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -126,2 +126,4 @@ 'use strict' | ||
const len2 = keys.length | ||
var checks = len1 | ||
const len = len1 > len2 ? len1 : len2 | ||
@@ -132,2 +134,3 @@ for (let i = 0; i < len; i++) { | ||
if (key === compare) { | ||
checks-- | ||
changed = property(key, t, subs, cb, branch) | ||
@@ -138,34 +141,38 @@ } else { | ||
} else { | ||
let j = hot.length | ||
let block | ||
while (!block && (j -= 3) > -1) { | ||
if (key !== void 0 && hot[j + 1] === key) { | ||
$keys[i] = key | ||
changed = property(key, t, subs, cb, branch) | ||
if (compare === hot[j]) { | ||
if (compare && $keys[hot[j + 2]] !== compare) { | ||
$keys[hot[j + 2]] = compare | ||
if (checks) { | ||
let j = hot.length | ||
let block | ||
while (!block && (j -= 3) > -1) { | ||
if (key !== void 0 && hot[j + 1] === key) { | ||
$keys[i] = key | ||
changed = property(key, t, subs, cb, branch) | ||
if (compare === hot[j]) { | ||
if (compare && $keys[hot[j + 2]] !== compare) { | ||
$keys[hot[j + 2]] = compare | ||
} | ||
hot.splice(j, 3) | ||
block = true | ||
} else { | ||
hot[j + 1] = key = void 0 | ||
if (hot[j] === void 0) { hot.splice(j, 3) } | ||
if (compare === void 0) { block = true } | ||
} | ||
hot.splice(j, 3) | ||
block = true | ||
} else { | ||
hot[j + 1] = key = void 0 | ||
if (hot[j] === void 0) { hot.splice(j, 3) } | ||
if (compare === void 0) { block = true } | ||
} else if (compare !== void 0 && compare === hot[j]) { | ||
let index = hot[j + 2] | ||
$keys[index] = compare | ||
changed = property(compare, t, subs, cb, branch) | ||
if (key === hot[j + 1]) { | ||
hot.splice(j, 3) | ||
block = true | ||
} else { | ||
hot[j] = compare = void 0 | ||
if (hot[j + 1] === void 0) { hot.splice(j, 3) } | ||
if (key === void 0) { block = true } | ||
} | ||
} | ||
} else if (compare !== void 0 && compare === hot[j]) { | ||
let index = hot[j + 2] | ||
$keys[index] = compare | ||
changed = property(compare, t, subs, cb, branch) | ||
if (key === hot[j + 1]) { | ||
hot.splice(j, 3) | ||
block = true | ||
} else { | ||
hot[j] = compare = void 0 | ||
if (hot[j + 1] === void 0) { hot.splice(j, 3) } | ||
if (key === void 0) { block = true } | ||
} | ||
} | ||
if (!block) { hot.push(key, compare, i) } | ||
} else { | ||
hot.push(key, void 0, i) | ||
} | ||
if (!block) { hot.push(key, compare, i) } | ||
} | ||
@@ -172,0 +179,0 @@ } |
{ | ||
"name": "brisky-struct", | ||
"description": "An observable data structure", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
337068
6218