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

demux

Package Overview
Dependencies
Maintainers
3
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

demux - npm Package Compare versions

Comparing version 3.1.4-29827da.0 to 3.1.4-5148a4c.0

11

dist/AbstractActionHandler.d.ts

@@ -44,2 +44,13 @@ import * as Logger from "bunyan";

/**
* This method is used when matching the types of incoming actions against the types the `Updater`s and `Effect`s are
* subscribed to. When this returns true, their corresponding functions will run.
*
* By default, this method tests for direct equivalence between the incoming candidate type and the type that is
* subscribed. Override this method to extend this functionality (e.g. wildcards).
*
* @param candidateType The incoming action's type
* @param subscribedType The type the Updater of Effect is subscribed to
*/
protected matchActionType(candidateType: string, subscribedType: string): boolean;
/**
* Process actions against deterministically accumulating `Updater` functions. Returns a promise of versioned actions

@@ -46,0 +57,0 @@ * for consumption by `runEffects`, to make sure the correct effects are run on blocks that include a `HandlerVersion`

17

dist/AbstractActionHandler.js

@@ -83,2 +83,15 @@ "use strict";

/**
* This method is used when matching the types of incoming actions against the types the `Updater`s and `Effect`s are
* subscribed to. When this returns true, their corresponding functions will run.
*
* By default, this method tests for direct equivalence between the incoming candidate type and the type that is
* subscribed. Override this method to extend this functionality (e.g. wildcards).
*
* @param candidateType The incoming action's type
* @param subscribedType The type the Updater of Effect is subscribed to
*/
matchActionType(candidateType, subscribedType) {
return candidateType === subscribedType;
}
/**
* Process actions against deterministically accumulating `Updater` functions. Returns a promise of versioned actions

@@ -97,3 +110,3 @@ * for consumption by `runEffects`, to make sure the correct effects are run on blocks that include a `HandlerVersion`

updaterIndex += 1;
if (action.type === updater.actionType) {
if (this.matchActionType(action.type, updater.actionType)) {
const { payload } = action;

@@ -124,3 +137,3 @@ const newVersion = yield updater.apply(state, payload, blockInfo, context);

for (const effect of this.handlerVersionMap[handlerVersionName].effects) {
if (action.type === effect.actionType) {
if (this.matchActionType(action.type, effect.actionType)) {
const { payload } = action;

@@ -127,0 +140,0 @@ effect.run(payload, block, context);

2

package.json
{
"name": "demux",
"version": "3.1.4-29827da.0",
"version": "3.1.4-5148a4c.0",
"author": {

@@ -5,0 +5,0 @@ "name": "Julien Heller",

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