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

s-js

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

s-js - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

6

dist/es/S.js

@@ -5,3 +5,3 @@ // Public interface

if (owner === null)
throw new Error("all computations must be created under a parent computation or root");
console.warn("computations created without a root or parent cannot be disposed");
var node = new ComputationNode(fn, value);

@@ -15,3 +15,3 @@ Owner = RunningNode = node;

}
if (owner !== UNOWNED) {
if (owner && owner !== UNOWNED) {
if (owner.owned === null)

@@ -135,3 +135,3 @@ owner.owned = [node];

if (age === time)
throw new Error("conflicting values: " + value + " is not the same as " + current);
throw new Error("conflicting values: " + update + " is not the same as " + current);
age = time;

@@ -138,0 +138,0 @@ current = update;

@@ -5,3 +5,3 @@ // Public interface

if (owner === null)
throw new Error("all computations must be created under a parent computation or root");
console.warn("computations created without a root or parent cannot be disposed");
var node = new ComputationNode(clock, fn, value);

@@ -15,3 +15,3 @@ Owner = RunningNode = node;

}
if (owner !== UNOWNED) {
if (owner && owner !== UNOWNED) {
if (owner.owned === null)

@@ -192,3 +192,3 @@ owner.owned = [node];

if (age === time)
throw new Error("conflicting values: " + value + " is not the same as " + current);
throw new Error("conflicting values: " + update + " is not the same as " + current);
age = time;

@@ -195,0 +195,0 @@ current = update;

@@ -11,3 +11,3 @@ (function (global, factory) {

if (owner === null)
throw new Error("all computations must be created under a parent computation or root");
console.warn("computations created without a root or parent cannot be disposed");
var node = new ComputationNode(fn, value);

@@ -21,3 +21,3 @@ Owner = RunningNode = node;

}
if (owner !== UNOWNED) {
if (owner && owner !== UNOWNED) {
if (owner.owned === null)

@@ -140,3 +140,3 @@ owner.owned = [node];

if (age === time)
throw new Error("conflicting values: " + value + " is not the same as " + current);
throw new Error("conflicting values: " + update + " is not the same as " + current);
age = time;

@@ -143,0 +143,0 @@ current = update;

@@ -11,3 +11,3 @@ (function (global, factory) {

if (owner === null)
throw new Error("all computations must be created under a parent computation or root");
console.warn("computations created without a root or parent cannot be disposed");
var node = new ComputationNode(clock, fn, value);

@@ -21,3 +21,3 @@ Owner = RunningNode = node;

}
if (owner !== UNOWNED) {
if (owner && owner !== UNOWNED) {
if (owner.owned === null)

@@ -197,3 +197,3 @@ owner.owned = [node];

if (age === time)
throw new Error("conflicting values: " + value + " is not the same as " + current);
throw new Error("conflicting values: " + update + " is not the same as " + current);
age = time;

@@ -200,0 +200,0 @@ current = update;

{
"name": "s-js",
"version": "0.4.2",
"version": "0.4.3",
"description": "S.js - simple, clean, fast reactive programming in Javascript",

@@ -5,0 +5,0 @@ "main": "dist/S.js",

@@ -42,7 +42,7 @@ /* globals S, describe, it, expect */

it("is necessary to create a toplevel computation", function () {
expect(() => {
S(() => 1)
}).toThrowError(/root/);
});
//it("is necessary to create a toplevel computation", function () {
// expect(() => {
// S(() => 1)
// }).toThrowError(/root/);
//});

@@ -49,0 +49,0 @@ it("does not freeze updates when used at top level", function () {

@@ -36,3 +36,3 @@

if (owner === null) throw new Error("all computations must be created under a parent computation or root");
if (owner === null) console.warn("computations created without a root or parent will never be disposed");

@@ -49,3 +49,3 @@ var node = new ComputationNode(fn, value);

if (owner !== UNOWNED) {
if (owner && owner !== UNOWNED) {
if (owner.owned === null) owner.owned = [node];

@@ -174,3 +174,3 @@ else owner.owned.push(node);

if (age === time)
throw new Error("conflicting values: " + value + " is not the same as " + current);
throw new Error("conflicting values: " + update + " is not the same as " + current);
age = time;

@@ -225,3 +225,3 @@ current = update!;

} else {
throw new Error("S.cleanup() must be called from within an S() computation. Cannot call it at toplevel.");
console.warn("cleanups created without a root or parent will never be run");
}

@@ -228,0 +228,0 @@ };

@@ -41,3 +41,3 @@

if (owner === null) throw new Error("all computations must be created under a parent computation or root");
if (owner === null) console.warn("computations created without a root or parent cannot be disposed");

@@ -54,3 +54,3 @@ var node = new ComputationNode(clock, fn, value);

if (owner !== UNOWNED) {
if (owner && owner !== UNOWNED) {
if (owner.owned === null) owner.owned = [node];

@@ -237,3 +237,3 @@ else owner.owned.push(node);

if (age === time)
throw new Error("conflicting values: " + value + " is not the same as " + current);
throw new Error("conflicting values: " + update + " is not the same as " + current);
age = time;

@@ -288,3 +288,3 @@ current = update!;

} else {
throw new Error("S.cleanup() must be called from within an S() computation. Cannot call it at toplevel.");
console.warn("cleanups created without a root or parent will never be run");
}

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