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

electron-redux

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-redux - npm Package Compare versions

Comparing version 1.4.0 to 1.5.1

4

dist/__mocks__/debug.js

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

});
exports.default = void 0;
exports["default"] = void 0;

@@ -13,2 +13,2 @@ var _default = jest.fn(function () {

exports.default = _default;
exports["default"] = _default;

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

});
exports.remote = exports.ipcRenderer = exports.ipcMain = exports.webContents = exports.default = void 0;
exports.remote = exports.ipcRenderer = exports.ipcMain = exports.webContents = exports["default"] = void 0;
var _default = jest.fn();
exports.default = _default;
exports["default"] = _default;
var webContents = {

@@ -13,0 +13,0 @@ getAllWebContents: jest.fn(function () {

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

});
exports.default = void 0;
exports["default"] = void 0;

@@ -13,2 +13,2 @@ var _default = jest.fn(function () {

exports.default = _default;
exports["default"] = _default;

@@ -7,3 +7,3 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -14,9 +14,9 @@ jest.unmock('../createAliasedAction');

var fn = jest.fn();
(0, _createAliasedAction.default)('some', fn);
expect(_alias.default.set).toHaveBeenCalledTimes(1);
expect(_alias.default.set).toHaveBeenCalledWith('some', fn);
(0, _createAliasedAction["default"])('some', fn);
expect(_alias["default"].set).toHaveBeenCalledTimes(1);
expect(_alias["default"].set).toHaveBeenCalledWith('some', fn);
});
it('should return the aliased action', function () {
var fn = jest.fn();
var actionCreator = (0, _createAliasedAction.default)('some', fn);
var actionCreator = (0, _createAliasedAction["default"])('some', fn);
expect(actionCreator).toBeInstanceOf(Function);

@@ -23,0 +23,0 @@ var action = actionCreator(1, 2);

@@ -7,3 +7,3 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -23,4 +23,4 @@ jest.unmock('../getInitialStateRenderer');

expect((0, _getInitialStateRenderer.default)()).toEqual(state);
expect((0, _getInitialStateRenderer["default"])()).toEqual(state);
});
});

@@ -7,3 +7,3 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -19,3 +19,3 @@ jest.unmock('../replayActionMain');

var payload = 123;
(0, _replayActionMain.default)(store);
(0, _replayActionMain["default"])(store);
expect(_electron.ipcMain.on).toHaveBeenCalledTimes(1);

@@ -34,3 +34,3 @@ expect(_electron.ipcMain.on.mock.calls[0][0]).toBe('redux-action');

var newState = {
new: 'state'
"new": 'state'
};

@@ -44,3 +44,3 @@ var store = {

store.getState.mockReturnValueOnce(newState);
(0, _replayActionMain.default)(store);
(0, _replayActionMain["default"])(store);
expect(global.getReduxState()).toEqual(JSON.stringify(initialState));

@@ -47,0 +47,0 @@ expect(store.getState).toHaveBeenCalledTimes(1);

@@ -7,3 +7,3 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -17,3 +17,3 @@ jest.unmock('../replayActionRenderer');

var payload = 123;
(0, _replayActionRenderer.default)(store);
(0, _replayActionRenderer["default"])(store);
expect(_electron.ipcRenderer.on).toHaveBeenCalledTimes(1);

@@ -20,0 +20,0 @@ expect(_electron.ipcRenderer.on.mock.calls[0][0]).toBe('redux-action');

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

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -19,11 +19,11 @@ jest.unmock('../validateAction');

};
expect((0, _validateAction.default)(action)).toBeTruthy();
expect((0, _validateAction["default"])(action)).toBeTruthy();
});
it('should reject non-FSA-compliant actions', function () {
expect((0, _validateAction.default)({})).toBeFalsy();
expect((0, _validateAction.default)({
expect((0, _validateAction["default"])({})).toBeFalsy();
expect((0, _validateAction["default"])({
meta: {}
})).toBeFalsy();
expect((0, _validateAction.default)(function () {})).toBeFalsy();
expect((0, _validateAction["default"])(function () {})).toBeFalsy();
});
});

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

});
exports.default = createAliasedAction;
exports["default"] = createAliasedAction;

@@ -13,7 +13,7 @@ var _alias = require("../actions/alias");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function createAliasedAction(name, actionCreator) {
// register
_alias2.default.set(name, actionCreator); // factory
_alias2["default"].set(name, actionCreator); // factory

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

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

});
exports.default = getInitialStateRenderer;
exports["default"] = getInitialStateRenderer;
var _electron = require("electron");
var _ref = typeof window != 'undefined' ? window.require('electron') : require('electron'),
remote = _ref.remote;
function getInitialStateRenderer() {
var getReduxState = _electron.remote.getGlobal('getReduxState');
var getReduxState = remote.getGlobal('getReduxState');

@@ -14,0 +15,0 @@ if (!getReduxState) {

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

});
exports.default = replayActionMain;
exports["default"] = replayActionMain;
var _electron = require("electron");
var _ref = typeof window != 'undefined' ? window.require('electron') : require('electron'),
ipcMain = _ref.ipcMain;

@@ -23,5 +24,5 @@ function replayActionMain(store) {

_electron.ipcMain.on('redux-action', function (event, payload) {
ipcMain.on('redux-action', function (event, payload) {
store.dispatch(payload);
});
}

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

});
exports.default = replayActionRenderer;
exports["default"] = replayActionRenderer;
var _electron = require("electron");
var _ref = typeof window != 'undefined' ? window.require('electron') : require('electron'),
ipcRenderer = _ref.ipcRenderer;
function replayActionRenderer(store) {
_electron.ipcRenderer.on('redux-action', function (event, payload) {
ipcRenderer.on('redux-action', function (event, payload) {
store.dispatch(payload);
});
}

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

});
exports.default = validateAction;
exports["default"] = validateAction;

@@ -13,5 +13,5 @@ var _fluxStandardAction = require("flux-standard-action");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var log = (0, _debug.default)('electron-redux:validateAction');
var log = (0, _debug["default"])('electron-redux:validateAction');

@@ -18,0 +18,0 @@ function validateAction(action) {

"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
Object.defineProperty(exports, "__esModule", {

@@ -9,3 +11,3 @@ value: true

get: function get() {
return _forwardToMain.default;
return _forwardToMain["default"];
}

@@ -22,3 +24,3 @@ });

get: function get() {
return _forwardToRenderer.default;
return _forwardToRenderer["default"];
}

@@ -29,3 +31,3 @@ });

get: function get() {
return _triggerAlias.default;
return _triggerAlias["default"];
}

@@ -36,3 +38,3 @@ });

get: function get() {
return _createAliasedAction.default;
return _createAliasedAction["default"];
}

@@ -43,3 +45,3 @@ });

get: function get() {
return _replayActionMain.default;
return _replayActionMain["default"];
}

@@ -50,3 +52,3 @@ });

get: function get() {
return _replayActionRenderer.default;
return _replayActionRenderer["default"];
}

@@ -57,3 +59,3 @@ });

get: function get() {
return _getInitialStateRenderer.default;
return _getInitialStateRenderer["default"];
}

@@ -76,4 +78,6 @@ });

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
var _electron = require("electron");

@@ -9,10 +11,12 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
jest.unmock('../forwardToMain');
describe('forwardToMain', function () {
beforeEach(function () {
_validateAction.default.mockReturnValue(true);
_validateAction["default"].mockReturnValue(true);
});

@@ -24,5 +28,5 @@ it("should pass an action through if it doesn't pass validation (FSA)", function () {

_validateAction.default.mockReturnValue(false);
_validateAction["default"].mockReturnValue(false);
(0, _forwardToMain.default)()(next)(action);
(0, _forwardToMain["default"])()(next)(action);
expect(next).toHaveBeenCalledTimes(1);

@@ -36,3 +40,3 @@ expect(next).toHaveBeenCalledWith(action);

};
(0, _forwardToMain.default)()(next)(action);
(0, _forwardToMain["default"])()(next)(action);
expect(next).toHaveBeenCalledTimes(1);

@@ -46,3 +50,3 @@ expect(next).toHaveBeenCalledWith(action);

};
(0, _forwardToMain.default)()(next)(action);
(0, _forwardToMain["default"])()(next)(action);
expect(next).toHaveBeenCalledTimes(1);

@@ -59,3 +63,3 @@ expect(next).toHaveBeenCalledWith(action);

};
(0, _forwardToMain.default)()(next)(action);
(0, _forwardToMain["default"])()(next)(action);
expect(next).toHaveBeenCalledTimes(1);

@@ -72,3 +76,3 @@ expect(next).toHaveBeenCalledWith(action);

};
(0, _forwardToMain.default)()(next)(action);
(0, _forwardToMain["default"])()(next)(action);
expect(_electron.ipcRenderer.send).toHaveBeenCalledTimes(1);

@@ -83,3 +87,3 @@ expect(_electron.ipcRenderer.send).toHaveBeenCalledWith('redux-action', action);

_validateAction.default.mockReturnValue(true);
_validateAction["default"].mockReturnValue(true);
});

@@ -86,0 +90,0 @@ it('should forward an action through if it starts with @@', function () {

@@ -7,3 +7,3 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -17,3 +17,3 @@ jest.unmock('../forwardToRenderer');

};
(0, _forwardToRenderer.default)()(next)(action);
(0, _forwardToRenderer["default"])()(next)(action);
expect(next).toHaveBeenCalledTimes(1);

@@ -38,3 +38,3 @@ expect(next).toHaveBeenCalledWith(action);

(0, _forwardToRenderer.default)()(next)(action);
(0, _forwardToRenderer["default"])()(next)(action);
expect(send).toHaveBeenCalledTimes(1);

@@ -65,3 +65,3 @@ expect(send).toHaveBeenCalledWith('redux-action', {

(0, _forwardToRenderer.default)()(next)(action);
(0, _forwardToRenderer["default"])()(next)(action);
expect(next).toHaveBeenCalledTimes(1);

@@ -68,0 +68,0 @@ expect(next).toHaveBeenCalledWith(action);

@@ -7,3 +7,3 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -17,3 +17,3 @@ jest.unmock('../triggerAlias');

};
(0, _triggerAlias.default)()(next)(action);
(0, _triggerAlias["default"])()(next)(action);
expect(next).toHaveBeenCalledTimes(1);

@@ -42,7 +42,7 @@ expect(next).toHaveBeenCalledWith(action);

_alias.default.get.mockImplementation(function () {
_alias["default"].get.mockImplementation(function () {
return trigger;
});
(0, _triggerAlias.default)()(next)(aliasedAction);
(0, _triggerAlias["default"])()(next)(aliasedAction);
expect(trigger).toHaveBeenCalledTimes(1);

@@ -71,7 +71,7 @@

_alias.default.get.mockImplementation(function () {
_alias["default"].get.mockImplementation(function () {
return trigger;
});
(0, _triggerAlias.default)()(next)(aliasedAction);
(0, _triggerAlias["default"])()(next)(aliasedAction);
expect(trigger).toHaveBeenCalledTimes(1);

@@ -96,3 +96,3 @@ expect(next).toHaveBeenCalledTimes(1);

_alias.default.get.mockImplementation(function () {
_alias["default"].get.mockImplementation(function () {
return trigger;

@@ -102,3 +102,3 @@ });

expect(function () {
(0, _triggerAlias.default)()(next)(aliasedAction);
(0, _triggerAlias["default"])()(next)(aliasedAction);
}).toThrowError('No trigger defined');

@@ -122,3 +122,3 @@ });

_alias.default.get.mockImplementation(function () {
_alias["default"].get.mockImplementation(function () {
return trigger;

@@ -128,3 +128,3 @@ });

expect(function () {
(0, _triggerAlias.default)()(next)(aliasedAction);
(0, _triggerAlias["default"])()(next)(aliasedAction);
}).toThrowError('No trigger defined');

@@ -143,3 +143,3 @@ });

_alias.default.get.mockImplementation(function () {
_alias["default"].get.mockImplementation(function () {
return undefined;

@@ -149,5 +149,5 @@ });

expect(function () {
(0, _triggerAlias.default)()(next)(aliasedAction);
(0, _triggerAlias["default"])()(next)(aliasedAction);
}).toThrowError('Trigger alias MY_OTHER_ACTION not found');
});
});

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

});
exports.default = exports.forwardToMainWithParams = void 0;
exports["default"] = exports.forwardToMainWithParams = void 0;
var _electron = require("electron");
var _validateAction = _interopRequireDefault(require("../helpers/validateAction"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ref = typeof window != 'undefined' ? window.require('electron') : require('electron'),
ipcRenderer = _ref.ipcRenderer;
// eslint-disable-next-line consistent-return, no-unused-vars

@@ -23,3 +24,3 @@ var forwardToMainWithParams = function forwardToMainWithParams() {

blacklist = _params$blacklist === void 0 ? [] : _params$blacklist;
if (!(0, _validateAction.default)(action)) return next(action);
if (!(0, _validateAction["default"])(action)) return next(action);
if (action.meta && action.meta.scope === 'local') return next(action);

@@ -34,3 +35,3 @@

_electron.ipcRenderer.send('redux-action', action);
ipcRenderer.send('redux-action', action);
};

@@ -46,2 +47,2 @@ };

var _default = forwardToMain;
exports.default = _default;
exports["default"] = _default;

@@ -6,20 +6,25 @@ "use strict";

});
exports.default = void 0;
exports["default"] = void 0;
var _electron = require("electron");
var _validateAction = _interopRequireDefault(require("../helpers/validateAction"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var _ref = typeof window != 'undefined' ? window.require('electron') : require('electron'),
webContents = _ref.webContents;
var forwardToRenderer = function forwardToRenderer() {
return function (next) {
return function (action) {
if (!(0, _validateAction.default)(action)) return next(action);
if (!(0, _validateAction["default"])(action)) return next(action);
if (action.meta && action.meta.scope === 'local') return next(action); // change scope to avoid endless-loop
var rendererAction = _extends({}, action, {
meta: _extends({}, action.meta, {
var rendererAction = _objectSpread(_objectSpread({}, action), {}, {
meta: _objectSpread(_objectSpread({}, action.meta), {}, {
scope: 'local'

@@ -29,4 +34,3 @@ })

var allWebContents = _electron.webContents.getAllWebContents();
var allWebContents = webContents.getAllWebContents();
allWebContents.forEach(function (contents) {

@@ -41,2 +45,2 @@ contents.send('redux-action', rendererAction);

var _default = forwardToRenderer;
exports.default = _default;
exports["default"] = _default;

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

});
exports.default = void 0;
exports["default"] = void 0;

@@ -15,6 +15,16 @@ var _assert = _interopRequireDefault(require("assert"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var triggerAlias = function triggerAlias(store) {

@@ -25,7 +35,7 @@ return function (next) {

if (action.type === _alias.ALIASED) {
(0, _assert.default)(action.meta && action.meta.trigger, 'No trigger defined');
(0, _assert["default"])(action.meta && action.meta.trigger, 'No trigger defined');
var alias = _alias2.default.get(action.meta.trigger);
var alias = _alias2["default"].get(action.meta.trigger);
(0, _assert.default)(alias, "Trigger alias ".concat(action.meta.trigger, " not found"));
(0, _assert["default"])(alias, "Trigger alias ".concat(action.meta.trigger, " not found"));
var args = action.payload || []; // trigger alias

@@ -42,2 +52,2 @@

var _default = triggerAlias;
exports.default = _default;
exports["default"] = _default;

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

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -13,3 +13,3 @@ jest.unmock('../alias');

expect(function () {
_alias.default.set('abc', 123);
_alias["default"].set('abc', 123);
}).not.toThrow();

@@ -20,7 +20,7 @@ });

it('should get a value', function () {
_alias.default.set('abc', 123);
_alias["default"].set('abc', 123);
expect(_alias.default.get('abc')).toEqual(123);
expect(_alias["default"].get('abc')).toEqual(123);
});
});
});

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

});
exports.default = void 0;
exports["default"] = void 0;
var aliases = {};

@@ -17,2 +17,2 @@ var _default = {

};
exports.default = _default;
exports["default"] = _default;
{
"name": "electron-redux",
"version": "1.4.0",
"version": "1.5.1",
"description": "Use redux in the main and browser process in electron",

@@ -33,6 +33,6 @@ "main": "dist/index.js",

"flux-standard-action": "^2.0.0",
"redux": "^3.4.0"
"redux": "^4.0.1"
},
"peerDependencies": {
"redux": "^3.4.0"
"redux": "^4.0.1"
},

@@ -47,6 +47,6 @@ "devDependencies": {

"babel-jest": "^21.2.0",
"greenkeeper-lockfile": "^1.12.0",
"eslint": "^6.1.0",
"jest": "^21.2.1"
},
"gitHead": "d0e5cf291ac03b9fe0698fdd0c8c54320d173a6f"
"gitHead": "259b95c8caaa27a631ece6fd23e90c786176c7ce"
}
# electron-redux
[![CircleCI](https://circleci.com/gh/hardchor/electron-redux/tree/master.svg?style=svg)](https://circleci.com/gh/hardchor/electron-redux/tree/master)
[![Greenkeeper badge](https://badges.greenkeeper.io/hardchor/electron-redux.svg)](https://greenkeeper.io/)

@@ -173,2 +172,3 @@ - [electron-redux](#electron-redux)

- [Roman Paradeev](https://github.com/sameoldmadness)
- Anyone who has contributed by [asking questions & raising issues](https://github.com/hardchor/electron-redux/issues?q=is%3Aissue+is%3Aclosed) 🚀
- [Pelle Jacobs](https://github.com/pellejacobs)
- Everyone who has contributed by [asking questions & raising issues](https://github.com/hardchor/electron-redux/issues?q=is%3Aissue+is%3Aclosed) 🚀
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