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

@dhmk/atom

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dhmk/atom - npm Package Compare versions

Comparing version 2.0.1-test.13 to 2.0.1-test.14

2

esm/atoms/derived.d.ts

@@ -12,2 +12,4 @@ export declare class DerivedAtom {

deps: any;
prevDeps: any;
pdi: any;
isObserved: any;

@@ -14,0 +16,0 @@ isEffect: any;

20

esm/atoms/derived.js

@@ -63,4 +63,5 @@ var __assign = (this && this.__assign) || function () {

if (this.state === AtomState.Stale) {
var mark_1 = (this.mark = new Id());
var prevDeps = this.deps;
var mark = (this.mark = new Id());
this.prevDeps = this.deps;
this.pdi = 0;
this.deps = [];

@@ -91,8 +92,8 @@ if (!this.isObserved && runtime.currentAtom) {

runtime.currentAtom = prev;
prevDeps.forEach(function (t) {
var a = t.a;
if (a.m !== mark_1)
removeAtom(a, _this);
for (var i = this.pdi, d = this.prevDeps, s = d.length; i < s; i++) {
var a = d[i].a;
if (a.m !== mark)
removeAtom(a, this);
a.readFlag = false;
});
}
this.deps.forEach(function (t) {

@@ -126,2 +127,7 @@ var a = t.a;

}
var pd = this.prevDeps;
var pdi = this.pdi;
if (pdi < pd.length && pd[pdi].a === a) {
this.pdi++;
}
var tr = { a: a, v: v, t: t }; // literal is faster than class

@@ -128,0 +134,0 @@ a.m = mark;

@@ -12,2 +12,4 @@ export declare class DerivedAtom {

deps: any;
prevDeps: any;
pdi: any;
isObserved: any;

@@ -14,0 +16,0 @@ isEffect: any;

@@ -66,4 +66,5 @@ "use strict";

if (this.state === types_1.AtomState.Stale) {
var mark_1 = (this.mark = new types_1.Id());
var prevDeps = this.deps;
var mark = (this.mark = new types_1.Id());
this.prevDeps = this.deps;
this.pdi = 0;
this.deps = [];

@@ -94,8 +95,8 @@ if (!this.isObserved && runtime_1.runtime.currentAtom) {

runtime_1.runtime.currentAtom = prev;
prevDeps.forEach(function (t) {
var a = t.a;
if (a.m !== mark_1)
(0, shared_1.removeAtom)(a, _this);
for (var i = this.pdi, d = this.prevDeps, s = d.length; i < s; i++) {
var a = d[i].a;
if (a.m !== mark)
(0, shared_1.removeAtom)(a, this);
a.readFlag = false;
});
}
this.deps.forEach(function (t) {

@@ -129,2 +130,7 @@ var a = t.a;

}
var pd = this.prevDeps;
var pdi = this.pdi;
if (pdi < pd.length && pd[pdi].a === a) {
this.pdi++;
}
var tr = { a: a, v: v, t: t }; // literal is faster than class

@@ -131,0 +137,0 @@ a.m = mark;

{
"name": "@dhmk/atom",
"version": "2.0.1-test.13",
"version": "2.0.1-test.14",
"description": "Lightweight mobx-like observable values, computed values and side-effects",

@@ -5,0 +5,0 @@ "keywords": [

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