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

redux-flute

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-flute - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

CHANGELOG.md

11

dist/index.js

@@ -125,3 +125,12 @@ "use strict";

}).then(function (data) {
var newModelData = _extends({}, recordForAction, data),
// This will overwrite all Rails-style nested attributes (addresses_attributes)
// to blank objects each time they are successfully sent back to an API.
// TODO: Should move into a setting and test.
var recordForActionWithRailsStyleNestedAttributesBlanked = Object.keys(recordForAction).filter(function (attribute) {
return attribute.match(/_attributes$/);
}).reduce(function (attrs, attr) {
attrs[attr] = {};
return attrs;
}, _extends({}, recordForAction)),
newModelData = _extends({}, recordForActionWithRailsStyleNestedAttributesBlanked, data),
newModel = new model(newModelData);

@@ -128,0 +137,0 @@ _this.dispatch({ type: "@FLUTE_" + method + "_SUCCESS_" + modelTypeForAction, record: newModelData });

2

package.json
{
"name": "redux-flute",
"version": "0.2.4",
"version": "0.2.5",
"description": "Smart front-end data cache manager",

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

@@ -85,3 +85,12 @@ import Sugar from "./sugar"

.then(data=>{
const newModelData = {...recordForAction, ...data},
// This will overwrite all Rails-style nested attributes (addresses_attributes)
// to blank objects each time they are successfully sent back to an API.
// TODO: Should move into a setting and test.
const recordForActionWithRailsStyleNestedAttributesBlanked = Object.keys(recordForAction)
.filter(attribute=>(attribute.match(/_attributes$/)))
.reduce((attrs, attr)=>{
attrs[attr] = {}
return attrs;
}, {...recordForAction}),
newModelData = {...recordForActionWithRailsStyleNestedAttributesBlanked, ...data},
newModel = new model(newModelData);

@@ -88,0 +97,0 @@ this.dispatch({ type: `@FLUTE_${method}_SUCCESS_${modelTypeForAction}`, record:newModelData })

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