redux-object
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -0,1 +1,4 @@ | ||
### Version 0.5.1 (12th September 2017) | ||
Fixed returning empty array for relationships without data when ignoreLinks is true (https://github.com/yury-dymov/redux-object/issues/20) | ||
### Version 0.5.0 (13th July 2017) | ||
@@ -2,0 +5,0 @@ Accessing related object not in the store returning id instead of null if related object is not loaded but id is available (https://github.com/yury-dymov/redux-object/issues/18) |
@@ -92,3 +92,3 @@ module.exports = | ||
return []; | ||
return undefined; | ||
} | ||
@@ -95,0 +95,0 @@ |
@@ -1,1 +0,1 @@ | ||
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)||r}):null===a.data?null:i(e,a.data.type,a.data.id,n,o)||a.data;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]:{},d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},l={eager:!1,ignoreLinks:!1,includeType:!1},s=o({},l,a),c=s.eager,p=s.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,s,d)})}var y=u.toString(),v=t(r,y),g=d[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),d[v]=h,b.relationships&&Object.keys(b.relationships).forEach(function(r){c?h[r]=n(e,b,r,s,d):Object.defineProperty(h,r,{get:function(){var t="__"+r;return h[t]?h[t]:(h[t]=n(e,b,r,s,d),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}]); | ||
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)||r}):null===a.data?null:i(e,a.data.type,a.data.id,n,o)||a.data;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 })")}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]:{},d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},l={eager:!1,ignoreLinks:!1,includeType:!1},s=o({},l,a),c=s.eager,p=s.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,s,d)})}var y=u.toString(),v=t(r,y),g=d[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),d[v]=h,b.relationships&&Object.keys(b.relationships).forEach(function(r){c?h[r]=n(e,b,r,s,d):Object.defineProperty(h,r,{get:function(){var t="__"+r;return h[t]?h[t]:(h[t]=n(e,b,r,s,d),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.5.0", | ||
"version": "0.5.1", | ||
"description": "Builds complex JS object from normalized redux store. Best works with json-api-normalizer", | ||
@@ -5,0 +5,0 @@ "main": "dist/bundle.min.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13958
6