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

effector

Package Overview
Dependencies
Maintainers
1
Versions
272
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

effector - npm Package Compare versions

Comparing version 0.8.3 to 0.8.4

22

es/effect.js

@@ -15,3 +15,6 @@ import { async as subject } from 'most-subject';

var using = never;
var using = getWarn({
domainName,
name
});

@@ -140,3 +143,6 @@ function use(thunk) {

function never(props) {
var getWarn = ({
domainName,
name
}) => function never(props) {
console.warn(`

@@ -147,5 +153,13 @@

`, props);
Name:
${name}
Domain:
${domainName}
Arguments:
${props}
`);
return new Promise(() => {});
}
};
//# sourceMappingURL=effect.js.map

10

es/port.js
// import {type Subject, async as subject} from 'most-subject'
function isAction(data) {
return typeof data === 'object' && data != null && typeof data.type === 'string';
}
export function safeDispatch(data, dispatch) {
if (typeof data === 'object' && data != null && typeof data.type === 'string') {
dispatch(data);
}
if (Array.isArray(data)) return data.filter(isAction).forEach(action => dispatch(action));
if (isAction(data)) return dispatch(data);
return;
}

@@ -7,0 +11,0 @@ export function port(dispatch, state$, action$) {

@@ -27,3 +27,6 @@ "use strict";

var using = never;
var using = getWarn({
domainName,
name
});

@@ -152,3 +155,6 @@ function use(thunk) {

function never(props) {
var getWarn = ({
domainName,
name
}) => function never(props) {
console.warn(`

@@ -159,5 +165,13 @@

`, props);
Name:
${name}
Domain:
${domainName}
Arguments:
${props}
`);
return new Promise(() => {});
}
};
//# sourceMappingURL=effect.js.map

@@ -10,6 +10,10 @@ "use strict";

// import {type Subject, async as subject} from 'most-subject'
function isAction(data) {
return typeof data === 'object' && data != null && typeof data.type === 'string';
}
function safeDispatch(data, dispatch) {
if (typeof data === 'object' && data != null && typeof data.type === 'string') {
dispatch(data);
}
if (Array.isArray(data)) return data.filter(isAction).forEach(action => dispatch(action));
if (isAction(data)) return dispatch(data);
return;
}

@@ -16,0 +20,0 @@

{
"name": "effector",
"version": "0.8.3",
"version": "0.8.4",
"description": "Redux effects",

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

@@ -29,3 +29,3 @@ //@flow

// handlers.add((payload, state) => state$.next(state))
let using: (params: Params) => Promise<Done> = never
let using: (params: Params) => Promise<Done> = getWarn({domainName, name})
function use(thunk: (params: Params) => Promise<Done>) {

@@ -162,3 +162,3 @@ using = thunk

function never(props: any): Promise<any> {
const getWarn = ({domainName, name}) => function never(props: any): Promise<any> {
console.warn(`

@@ -169,4 +169,12 @@

`, props)
Name:
${name}
Domain:
${domainName}
Arguments:
${props}
`)
return new Promise(() => {})
}

@@ -6,2 +6,10 @@ //@flow

function isAction(data): boolean %checks {
return (
typeof data === 'object'
&& data != null
&& typeof data.type === 'string'
)
}
export function safeDispatch<R>(

@@ -11,9 +19,5 @@ data: R,

) {
if (
typeof data === 'object'
&& data != null
&& typeof data.type === 'string'
) {
dispatch(data)
}
if (Array.isArray(data)) return data.filter(isAction).forEach(action => dispatch(action))
if (isAction(data)) return dispatch(data)
return
}

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

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