Socket
Socket
Sign inDemoInstall

overmind

Package Overview
Dependencies
Maintainers
4
Versions
886
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

overmind - npm Package Compare versions

Comparing version 1.0.0-1532018253864 to 1.0.0-1532031987960

10

es/derived.js

@@ -7,5 +7,6 @@ class Derived {

this.cb = cb;
this.updateCount = 0;
return this.evaluate.bind(this);
}
evaluate(proxyStateTree) {
evaluate(actionChain, proxyStateTree, path) {
if (this.isDirty) {

@@ -24,2 +25,9 @@ const trackId = proxyStateTree.startPathsTracking();

}
actionChain.emit('derived', {
path,
paths: Array.from(this.paths),
updateCount: this.updateCount,
value: this.value,
});
this.updateCount++;
}

@@ -26,0 +34,0 @@ // Tracks the paths for the consumer of this derived value

@@ -9,3 +9,5 @@ import { actionChainFactory } from 'action-chain';

constructor(configuration, options = {}) {
const proxyStateTree = new ProxyStateTree(configuration.state || {});
const proxyStateTree = new ProxyStateTree(configuration.state || {}, {
dynamicWrapper: (proxyStateTree, path, func) => func(actionChain, proxyStateTree, path),
});
const actionChain = actionChainFactory(Object.assign({

@@ -85,2 +87,6 @@ state: proxyStateTree.get(),

}));
actionChain.on('derived', (data) => devtools.send({
type: 'derived',
data,
}));
this.devtools = devtools;

@@ -87,0 +93,0 @@ }

@@ -9,5 +9,6 @@ "use strict";

this.cb = cb;
this.updateCount = 0;
return this.evaluate.bind(this);
}
evaluate(proxyStateTree) {
evaluate(actionChain, proxyStateTree, path) {
if (this.isDirty) {

@@ -26,2 +27,9 @@ const trackId = proxyStateTree.startPathsTracking();

}
actionChain.emit('derived', {
path,
paths: Array.from(this.paths),
updateCount: this.updateCount,
value: this.value,
});
this.updateCount++;
}

@@ -28,0 +36,0 @@ // Tracks the paths for the consumer of this derived value

@@ -13,3 +13,5 @@ "use strict";

constructor(configuration, options = {}) {
const proxyStateTree = new proxy_state_tree_1.default(configuration.state || {});
const proxyStateTree = new proxy_state_tree_1.default(configuration.state || {}, {
dynamicWrapper: (proxyStateTree, path, func) => func(actionChain, proxyStateTree, path),
});
const actionChain = action_chain_1.actionChainFactory(Object.assign({

@@ -89,2 +91,6 @@ state: proxyStateTree.get(),

}));
actionChain.on('derived', (data) => devtools.send({
type: 'derived',
data,
}));
this.devtools = devtools;

@@ -91,0 +97,0 @@ }

6

package.json
{
"name": "overmind",
"version": "1.0.0-1532018253864",
"version": "1.0.0-1532031987960",
"description": "Functional actions",

@@ -36,5 +36,5 @@ "author": "Christian Alfoni <christianalfoni@gmail.com>",

"@types/node": "^10.5.1",
"action-chain": "1.0.0-1532018253864",
"action-chain": "1.0.0-1532031987960",
"is-plain-object": "^2.0.4",
"proxy-state-tree": "1.0.0-1532018253864",
"proxy-state-tree": "1.0.0-1532031987960",
"tslib": "^1.9.3"

@@ -41,0 +41,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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