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

redux-object

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-object - npm Package Compare versions

Comparing version 0.4.4 to 0.4.5

3

CHANGELOG.md

@@ -0,1 +1,4 @@

### Version 0.4.5 (09th July 2017)
Type is optionally propogated to objects (https://github.com/yury-dymov/redux-object/issues/16)
### Version 0.4.4 (26th May 2017)

@@ -2,0 +5,0 @@ Added unminified version for development https://github.com/yury-dymov/redux-object/issues/15

9

dist/bundle.js

@@ -100,5 +100,6 @@ module.exports =

var defOpts = { eager: false, ignoreLinks: false };
var defOpts = { eager: false, ignoreLinks: false, includeType: false };
var options = _extends({}, defOpts, providedOpts);
var eager = options.eager;
var eager = options.eager,
includeType = options.includeType;

@@ -141,2 +142,6 @@

if (includeType && !ret.type) {
ret.type = objectName;
}
cache[uuid] = ret;

@@ -143,0 +148,0 @@

@@ -1,1 +0,1 @@

module.exports=function(r){function e(n){if(t[n])return t[n].exports;var i=t[n]={exports:{},id:n,loaded:!1};return r[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var t={};return e.m=r,e.c=t,e.p="",e(0)}([function(r,e,t){r.exports=t(1)},function(r,e){"use strict";function t(r,e){return e?""+r+e:null}function n(r,e,t,n,o){var u=n.ignoreLinks,a=e.relationships[t];if("undefined"!=typeof a.data)return Array.isArray(a.data)?a.data.map(function(e){return i(r,e.type,e.id,n,o)}):null===a.data?null:i(r,a.data.type,a.data.id,n,o);if(!u&&a.links)throw new Error("Remote lazy loading is not supported (see: https://github.com/yury-dymov/json-api-normalizer/issues/2). To disable this error, include option 'ignoreLinks: true' in the build function like so: build(reducer, type, id, { ignoreLinks: true })");return[]}function i(r,e){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},l={eager:!1,ignoreLinks:!1},d=o({},l,a),f=d.eager;if(!r[e])return null;if(null===u||Array.isArray(u)){var c=u||Object.keys(r[e]);return c.map(function(t){return i(r,e,t,d,s)})}var p=u.toString(),y=t(e,p),v=s[y];if(v)return v;var g={},h=r[e][p];return h?(h.id&&(g.id=h.id),Object.keys(h.attributes).forEach(function(r){g[r]=h.attributes[r]}),s[y]=g,h.relationships&&Object.keys(h.relationships).forEach(function(e){f?g[e]=n(r,h,e,d,s):Object.defineProperty(g,e,{get:function(){var t="__"+e;return g[t]?g[t]:(g[t]=n(r,h,e,d,s),g[t])}})}),"undefined"==typeof g.id&&(g.id=p),g):null}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r};e.default=i}]);
module.exports=function(e){function r(n){if(t[n])return t[n].exports;var i=t[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}var t={};return r.m=e,r.c=t,r.p="",r(0)}([function(e,r,t){e.exports=t(1)},function(e,r){"use strict";function t(e,r){return r?""+e+r:null}function n(e,r,t,n,o){var u=n.ignoreLinks,a=r.relationships[t];if("undefined"!=typeof a.data)return Array.isArray(a.data)?a.data.map(function(r){return i(e,r.type,r.id,n,o)}):null===a.data?null:i(e,a.data.type,a.data.id,n,o);if(!u&&a.links)throw new Error("Remote lazy loading is not supported (see: https://github.com/yury-dymov/json-api-normalizer/issues/2). To disable this error, include option 'ignoreLinks: true' in the build function like so: build(reducer, type, id, { ignoreLinks: true })");return[]}function i(e,r){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s={eager:!1,ignoreLinks:!1,includeType:!1},d=o({},s,a),c=d.eager,p=d.includeType;if(!e[r])return null;if(null===u||Array.isArray(u)){var f=u||Object.keys(e[r]);return f.map(function(t){return i(e,r,t,d,l)})}var y=u.toString(),v=t(r,y),g=l[v];if(g)return g;var h={},b=e[r][y];return b?(b.id&&(h.id=b.id),Object.keys(b.attributes).forEach(function(e){h[e]=b.attributes[e]}),p&&!h.type&&(h.type=r),l[v]=h,b.relationships&&Object.keys(b.relationships).forEach(function(r){c?h[r]=n(e,b,r,d,l):Object.defineProperty(h,r,{get:function(){var t="__"+r;return h[t]?h[t]:(h[t]=n(e,b,r,d,l),h[t])}})}),"undefined"==typeof h.id&&(h.id=y),h):null}Object.defineProperty(r,"__esModule",{value:!0});var o=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};r.default=i}]);
{
"name": "redux-object",
"version": "0.4.4",
"version": "0.4.5",
"description": "Builds complex JS object from normalized redux store. Best works with json-api-normalizer",

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

@@ -23,2 +23,3 @@ # redux-object

| ignoreLinks | false | redux-object doesn't support remote objects. This option suppresses the exception thrown in case user accesses a property, which is not loaded to redux store yet. |
| includeType | false | Include the record type as a property 'type' on each result. This is particularly useful for identifying the record type returned by a polymorphic relationship. |

@@ -25,0 +26,0 @@

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