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

reactive-function

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reactive-function - npm Package Compare versions

Comparing version 0.12.0 to 0.13.0

5

index.js

@@ -124,4 +124,6 @@ var ReactiveProperty = require("reactive-property");

ReactiveFunction.digest = function (){
var changedIds = Object.keys(changed);
changed = {};
graph
.topologicalSort(Object.keys(changed), false)
.topologicalSort(changedIds, false)
.map(function (id){

@@ -133,3 +135,2 @@ return properties[id];

});
changed = {};

@@ -136,0 +137,0 @@ };

2

package.json
{
"name": "reactive-function",
"version": "0.12.0",
"version": "0.13.0",
"description": "A library for managing data flows and changing state.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -23,3 +23,3 @@ // Unit tests for reactive-function.

describe("Core Functionality", function() {
describe("Core Functionality", function() {
it("Should depend on two reactive properties.", function () {

@@ -434,2 +434,33 @@

it("Should execute a nested digest.", function (){
var a = ReactiveProperty(5);
var b = ReactiveProperty();
var c = ReactiveProperty();
var rf1 = ReactiveFunction({
inputs: [a],
callback: function (a){
for(var i = 0; i < a; i++){
b(i);
ReactiveFunction.digest();
assert.equal(c(), i / 2);
}
}
});
var rf2 = ReactiveFunction({
inputs: [b],
output: c,
callback: function (b){
return b / 2;
}
});
ReactiveFunction.digest();
rf1.destroy();
rf2.destroy();
});
});

@@ -541,3 +572,3 @@

// Fix by changing the value of initialId.
var initialId = 56;
var initialId = 60;

@@ -544,0 +575,0 @@ it("Should serialize the data flow graph.", function (){

Sorry, the diff of this file is not supported yet

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