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

@galette/core

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@galette/core - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

2

dist/hydra/redux.d.ts

@@ -8,2 +8,2 @@ import { Action, ActionLifecycleOptions } from "../store/redux/reducers";

export declare function reduceItems(state: object, action: Action, options: HydraOptions): {};
export declare function reduceListAndItems(state: object, action: Action, options: HydraOptions): import("src/store/redux/reducers").ReducedList;
export declare function reduceListAndItems(state: object, action: Action, options: HydraOptions): {};

@@ -33,4 +33,4 @@ export declare type Action = {

};
export declare const reduceListAndItems: (state: {}, action: Action, options: ReduceListOptions) => ReducedList;
export declare const reduceListAndItems: (state: {}, action: Action, options: ReduceListOptions) => {};
export declare const reduceItems: (state: {}, action: Action, options: ReduceItemsOptions) => {};
export declare const reduceList: (state: any, action: Action, options: ReduceListOptions) => ReducedList;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var functions_1 = require("./functions");
var resolveActionsToHandle = function (options) {
if (options.actionPrefix) {
options.actions = {
starting: options.actionPrefix + '_SENT',
failed: options.actionPrefix + '_FAILED',
succeed: options.actionPrefix + '_RECEIVED',
};
}
return options.actions;
};
exports.reduceListAndItems = function (state, action, options) {
if (state === void 0) { state = {}; }
var actions = resolveActionsToHandle(options);
var actionTypes = Object.keys(actions).map(function (key) { return actions[key]; });
if (actionTypes.indexOf(action.type) === -1) {
return state;
}
return exports.reduceList(exports.reduceItems(state, action, options), action, options);

@@ -32,9 +47,3 @@ };

if (state === void 0) { state = {}; }
if (options.actionPrefix) {
options.actions = {
starting: options.actionPrefix + '_SENT',
failed: options.actionPrefix + '_FAILED',
succeed: options.actionPrefix + '_RECEIVED',
};
}
var actions = resolveActionsToHandle(options);
// If the list does not exists.

@@ -44,3 +53,3 @@ if (!state[options.listKeyInState]) {

}
if (action.type === options.actions.starting) {
if (action.type === actions.starting) {
return functions_1.updateItem(state, options.listKeyInState, {

@@ -51,3 +60,3 @@ loading: true,

}
if (action.type === options.actions.succeed) {
if (action.type === actions.succeed) {
var items = itemsFromAction(action, options);

@@ -70,3 +79,3 @@ var totalItems = 'function' === typeof options.totalItems

}
if (action.type === options.actions.failed) {
if (action.type === actions.failed) {
var errorResolver = options.errorMessageResolver ? options.errorMessageResolver : defaultErrorMessageResolver;

@@ -73,0 +82,0 @@ return functions_1.updateItem(state, options.listKeyInState, {

{
"name": "@galette/core",
"version": "0.0.9",
"version": "0.0.10",
"scripts": {

@@ -5,0 +5,0 @@ "build": "npm run build-ts",

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