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

normalizr

Package Overview
Dependencies
Maintainers
2
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

normalizr - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

2

dist/normalizr.min.js

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

!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.normalizr=r():t.normalizr=r()}(this,function(){return function(t){function r(e){if(n[e])return n[e].exports;var o=n[e]={exports:{},id:e,loaded:!1};return t[e].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var n={};return r.m=t,r.c=n,r.p="",r(0)}([function(t,r,n){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}function o(t,r,n){t[r]=n}function a(t,r,n,e){var a=e.assignEntity,i=void 0===a?o:a,u={};for(var c in t)if(t.hasOwnProperty(c)){var f=l(t[c],r[c],n,e);i.call(null,u,c,f,t)}return u}function i(t,r,n,e){return function(t){return l(t,r,n,e)}}function u(t,r,n,e){return function(o){var a=t.getSchemaKey(o),i=l(o,r[a],n,e);return{id:i,schema:a}}}function c(t,r,n,e){var o=r.getItemSchema(),a=i(r,o,n,e);return Array.isArray(t)?t.map(a):Object.keys(t).reduce(function(r,n){return r[n]=a(t[n]),r},{})}function f(t,r,n,e){var o=r.getItemSchema();return u(r,o,n,e)(t)}function s(t,r,n){for(var e in r)r.hasOwnProperty(e)&&(t.hasOwnProperty(e)&&!A["default"](t[e],r[e])?console.warn("When merging two "+n+', found unequal data in their "'+e+'" values. Using the earlier value.',t[e],r[e]):t[e]=r[e])}function p(t,r,n,e){var o=e.mergeIntoEntity,i=void 0===o?s:o,u=r.getKey(),c=r.getId(t);n.hasOwnProperty(u)||(n[u]={}),n[u].hasOwnProperty(c)||(n[u][c]={});var f=n[u][c],p=a(t,r,n,e);return i(f,p,u),c}function l(t,r,n,e){return S["default"](t)&&S["default"](r)?r instanceof _["default"]?p(t,r,n,e):r instanceof m["default"]?c(t,r,n,e):r instanceof j["default"]?f(t,r,n,e):a(t,r,n,e):t}function v(t,r){return new m["default"](t,r)}function h(t,r){return new m["default"](t,r)}function y(t,r){return new j["default"](t,r)}function d(t,r){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if(!S["default"](t)&&!Array.isArray(t))throw new Error("Normalize accepts an object or an array as its input.");if(!S["default"](r)||Array.isArray(r))throw new Error("Normalize accepts an object for schema.");var e={},o=l(t,r,e,n);return{entities:e,result:o}}r.__esModule=!0,r.arrayOf=v,r.valuesOf=h,r.unionOf=y,r.normalize=d;var b=n(22),_=e(b),g=n(23),m=e(g),x=n(11),j=e(x),w=n(63),A=e(w),O=n(3),S=e(O);r.Schema=_["default"]},function(t,r,n){var e=n(6),o=n(2),a=e(o,"Map");t.exports=a},function(t,r,n){(function(t,e){var o=n(37),a={"function":!0,object:!0},i=a[typeof r]&&r&&!r.nodeType?r:void 0,u=a[typeof t]&&t&&!t.nodeType?t:void 0,c=o(i&&u&&"object"==typeof e&&e),f=o(a[typeof self]&&self),s=o(a[typeof window]&&window),p=o(a[typeof this]&&this),l=c||s!==(p&&p.window)&&s||f||p||Function("return this")();t.exports=l}).call(r,n(68)(t),function(){return this}())},function(t,r){function n(t){var r=typeof t;return!!t&&("object"==r||"function"==r)}t.exports=n},function(t,r){function n(t){return!!t&&"object"==typeof t}t.exports=n},function(t,r,n){function e(t,r){for(var n=t.length;n--;)if(o(t[n][0],r))return n;return-1}var o=n(60);t.exports=e},function(t,r,n){function e(t,r){var n=t[r];return o(n)?n:void 0}var o=n(64);t.exports=e},function(t,r){function n(t){var r=typeof t;return"number"==r||"boolean"==r||"string"==r&&"__proto__"!=t||null==t}t.exports=n},function(t,r,n){var e=n(6),o=e(Object,"create");t.exports=o},function(t,r){var n=Array.isArray;t.exports=n},function(t,r){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&e>=t}var e=9007199254740991;t.exports=n},function(t,r,n){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var a=n(3),i=e(a),u=function(){function t(r,n){if(o(this,t),!i["default"](r))throw new Error("UnionSchema requires item schema to be an object.");if(!n||!n.schemaAttribute)throw new Error("UnionSchema requires schemaAttribute option.");this._itemSchema=r;var e=n.schemaAttribute;this._getSchema="function"==typeof e?e:function(t){return t[e]}}return t.prototype.getItemSchema=function(){return this._itemSchema},t.prototype.getSchemaKey=function(t){return this._getSchema(t)},t}();r["default"]=u,t.exports=r["default"]},function(t,r,n){function e(t,r){var n=o(t,r);if(0>n)return!1;var e=t.length-1;return n==e?t.pop():i.call(t,n,1),!0}var o=n(5),a=Array.prototype,i=a.splice;t.exports=e},function(t,r,n){function e(t,r){var n=o(t,r);return 0>n?void 0:t[n][1]}var o=n(5);t.exports=e},function(t,r,n){function e(t,r){return o(t,r)>-1}var o=n(5);t.exports=e},function(t,r,n){function e(t,r,n){var e=o(t,r);0>e?t.push([r,n]):t[e][1]=n}var o=n(5);t.exports=e},function(t,r){function n(t,r){return o.call(t,r)||"object"==typeof t&&r in t&&null===a(t)}var e=Object.prototype,o=e.hasOwnProperty,a=Object.getPrototypeOf;t.exports=n},function(t,r,n){function e(t,r,n,e,u,c){var f=-1,s=u&i,p=u&a,l=t.length,v=r.length;if(l!=v&&!(s&&v>l))return!1;var h=c.get(t);if(h)return h==r;var y=!0;for(c.set(t,r);++f<l;){var d=t[f],b=r[f];if(e)var _=s?e(b,d,f,r,t,c):e(d,b,f,t,r,c);if(void 0!==_){if(_)continue;y=!1;break}if(p){if(!o(r,function(t){return d===t||n(d,t,e,u,c)})){y=!1;break}}else if(d!==b&&!n(d,b,e,u,c)){y=!1;break}}return c["delete"](t),y}var o=n(31),a=1,i=2;t.exports=e},function(t,r,n){function e(t,r){return o?void 0!==t[r]:i.call(t,r)}var o=n(8),a=Object.prototype,i=a.hasOwnProperty;t.exports=e},function(t,r){function n(t){var r=!1;if(null!=t&&"function"!=typeof t.toString)try{r=!!(t+"")}catch(n){}return r}t.exports=n},function(t,r,n){function e(t){return null!=t&&i(o(t))&&!a(t)}var o=n(40),a=n(21),i=n(10);t.exports=e},function(t,r,n){function e(t){var r=o(t)?c.call(t):"";return r==a||r==i}var o=n(3),a="[object Function]",i="[object GeneratorFunction]",u=Object.prototype,c=u.toString;t.exports=e},function(t,r){"use strict";function n(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var e=function(){function t(r){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(n(this,t),!r||"string"!=typeof r)throw new Error("A string non-empty key is required");this._key=r;var o=e.idAttribute||"id";this._getId="function"==typeof o?o:function(t){return t[o]},this._idAttribute=o}return t.prototype.getKey=function(){return this._key},t.prototype.getId=function(t){return this._getId(t)},t.prototype.getIdAttribute=function(){return this._idAttribute},t.prototype.define=function(t){for(var r in t)t.hasOwnProperty(r)&&(this[r]=t[r])},t}();r["default"]=e,t.exports=r["default"]},function(t,r,n){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var a=n(3),i=e(a),u=n(11),c=e(u),f=function(){function t(r){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(o(this,t),!i["default"](r))throw new Error("ArraySchema requires item schema to be an object.");if(n.schemaAttribute){var e=n.schemaAttribute;this._itemSchema=new c["default"](r,{schemaAttribute:e})}else this._itemSchema=r}return t.prototype.getItemSchema=function(){return this._itemSchema},t}();r["default"]=f,t.exports=r["default"]},function(t,r,n){function e(){}var o=n(8),a=Object.prototype;e.prototype=o?o(null):a,t.exports=e},function(t,r,n){function e(t){var r=-1,n=t?t.length:0;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}var o=n(48),a=n(49),i=n(50),u=n(51),c=n(52);e.prototype.clear=o,e.prototype["delete"]=a,e.prototype.get=i,e.prototype.has=u,e.prototype.set=c,t.exports=e},function(t,r,n){var e=n(6),o=n(2),a=e(o,"Set");t.exports=a},function(t,r,n){function e(t){var r=-1,n=t?t.length:0;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}var o=n(55),a=n(56),i=n(57),u=n(58),c=n(59);e.prototype.clear=o,e.prototype["delete"]=a,e.prototype.get=i,e.prototype.has=u,e.prototype.set=c,t.exports=e},function(t,r,n){var e=n(2),o=e.Symbol;t.exports=o},function(t,r,n){var e=n(2),o=e.Uint8Array;t.exports=o},function(t,r,n){var e=n(6),o=n(2),a=e(o,"WeakMap");t.exports=a},function(t,r){function n(t,r){for(var n=-1,e=t.length;++n<e;)if(r(t[n],n,t))return!0;return!1}t.exports=n},function(t,r,n){function e(t,r,n,u,c){return t===r?!0:null==t||null==r||!a(t)&&!i(r)?t!==t&&r!==r:o(t,r,e,n,u,c)}var o=n(33),a=n(3),i=n(4);t.exports=e},function(t,r,n){function e(t,r,n,e,d,_){var g=f(t),m=f(r),x=h,j=h;g||(x=c(t),x=x==v?y:x),m||(j=c(r),j=j==v?y:j);var w=x==y&&!s(t),A=j==y&&!s(r),O=x==j;if(O&&!w)return _||(_=new o),g||p(t)?a(t,r,n,e,d,_):i(t,r,x,n,e,d,_);if(!(d&l)){var S=w&&b.call(t,"__wrapped__"),E=A&&b.call(r,"__wrapped__");if(S||E)return _||(_=new o),n(S?t.value():t,E?r.value():r,e,d,_)}return O?(_||(_=new o),u(t,r,n,e,d,_)):!1}var o=n(27),a=n(17),i=n(38),u=n(39),c=n(41),f=n(9),s=n(19),p=n(66),l=2,v="[object Arguments]",h="[object Array]",y="[object Object]",d=Object.prototype,b=d.hasOwnProperty;t.exports=e},function(t,r){function n(t){return e(Object(t))}var e=Object.keys;t.exports=n},function(t,r){function n(t){return function(r){return null==r?void 0:r[t]}}t.exports=n},function(t,r){function n(t,r){for(var n=-1,e=Array(t);++n<t;)e[n]=r(n);return e}t.exports=n},function(t,r){function n(t){return t&&t.Object===Object?t:null}t.exports=n},function(t,r,n){function e(t,r,n,e,o,x,w){switch(n){case m:return!(t.byteLength!=r.byteLength||!e(new a(t),new a(r)));case p:case l:return+t==+r;case v:return t.name==r.name&&t.message==r.message;case y:return t!=+t?r!=+r:t==+r;case d:case _:return t==r+"";case h:var A=u;case b:var O=x&s;if(A||(A=c),t.size!=r.size&&!O)return!1;var S=w.get(t);return S?S==r:i(A(t),A(r),e,o,x|f,w.set(t,r));case g:if(j)return j.call(t)==j.call(r)}return!1}var o=n(28),a=n(29),i=n(17),u=n(53),c=n(54),f=1,s=2,p="[object Boolean]",l="[object Date]",v="[object Error]",h="[object Map]",y="[object Number]",d="[object RegExp]",b="[object Set]",_="[object String]",g="[object Symbol]",m="[object ArrayBuffer]",x=o?o.prototype:void 0,j=x?x.valueOf:void 0;t.exports=e},function(t,r,n){function e(t,r,n,e,u,c){var f=u&i,s=a(t),p=s.length,l=a(r),v=l.length;if(p!=v&&!f)return!1;for(var h=p;h--;){var y=s[h];if(!(f?y in r:o(r,y)))return!1}var d=c.get(t);if(d)return d==r;var b=!0;c.set(t,r);for(var _=f;++h<p;){y=s[h];var g=t[y],m=r[y];if(e)var x=f?e(m,g,y,r,t,c):e(g,m,y,t,r,c);if(!(void 0===x?g===m||n(g,m,e,u,c):x)){b=!1;break}_||(_="constructor"==y)}if(b&&!_){var j=t.constructor,w=r.constructor;j!=w&&"constructor"in t&&"constructor"in r&&!("function"==typeof j&&j instanceof j&&"function"==typeof w&&w instanceof w)&&(b=!1)}return c["delete"](t),b}var o=n(16),a=n(67),i=2;t.exports=e},function(t,r,n){var e=n(35),o=e("length");t.exports=o},function(t,r,n){function e(t){return v.call(t)}var o=n(1),a=n(26),i=n(30),u="[object Map]",c="[object Object]",f="[object Set]",s="[object WeakMap]",p=Object.prototype,l=Function.prototype.toString,v=p.toString,h=o?l.call(o):"",y=a?l.call(a):"",d=i?l.call(i):"";(o&&e(new o)!=u||a&&e(new a)!=f||i&&e(new i)!=s)&&(e=function(t){var r=v.call(t),n=r==c?t.constructor:null,e="function"==typeof n?l.call(n):"";if(e)switch(e){case h:return u;case y:return f;case d:return s}return r}),t.exports=e},function(t,r,n){function e(t,r){return o(t,r)&&delete t[r]}var o=n(18);t.exports=e},function(t,r,n){function e(t,r){if(o){var n=t[r];return n===a?void 0:n}return u.call(t,r)?t[r]:void 0}var o=n(8),a="__lodash_hash_undefined__",i=Object.prototype,u=i.hasOwnProperty;t.exports=e},function(t,r,n){function e(t,r,n){t[r]=o&&void 0===n?a:n}var o=n(8),a="__lodash_hash_undefined__";t.exports=e},function(t,r,n){function e(t){var r=t?t.length:void 0;return u(r)&&(i(t)||c(t)||a(t))?o(r,String):null}var o=n(36),a=n(61),i=n(9),u=n(10),c=n(65);t.exports=e},function(t,r){function n(t,r){return t="number"==typeof t||o.test(t)?+t:-1,r=null==r?e:r,t>-1&&t%1==0&&r>t}var e=9007199254740991,o=/^(?:0|[1-9]\d*)$/;t.exports=n},function(t,r){function n(t){var r=t&&t.constructor,n="function"==typeof r&&r.prototype||e;return t===n}var e=Object.prototype;t.exports=n},function(t,r,n){function e(){this.__data__={hash:new o,map:a?new a:[],string:new o}}var o=n(24),a=n(1);t.exports=e},function(t,r,n){function e(t){var r=this.__data__;return u(t)?i("string"==typeof t?r.string:r.hash,t):o?r.map["delete"](t):a(r.map,t)}var o=n(1),a=n(12),i=n(42),u=n(7);t.exports=e},function(t,r,n){function e(t){var r=this.__data__;return u(t)?i("string"==typeof t?r.string:r.hash,t):o?r.map.get(t):a(r.map,t)}var o=n(1),a=n(13),i=n(43),u=n(7);t.exports=e},function(t,r,n){function e(t){var r=this.__data__;return u(t)?i("string"==typeof t?r.string:r.hash,t):o?r.map.has(t):a(r.map,t)}var o=n(1),a=n(14),i=n(18),u=n(7);t.exports=e},function(t,r,n){function e(t,r){var n=this.__data__;return u(t)?i("string"==typeof t?n.string:n.hash,t,r):o?n.map.set(t,r):a(n.map,t,r),this}var o=n(1),a=n(15),i=n(44),u=n(7);t.exports=e},function(t,r){function n(t){var r=-1,n=Array(t.size);return t.forEach(function(t,e){n[++r]=[e,t]}),n}t.exports=n},function(t,r){function n(t){var r=-1,n=Array(t.size);return t.forEach(function(t){n[++r]=t}),n}t.exports=n},function(t,r){function n(){this.__data__={array:[],map:null}}t.exports=n},function(t,r,n){function e(t){var r=this.__data__,n=r.array;return n?o(n,t):r.map["delete"](t)}var o=n(12);t.exports=e},function(t,r,n){function e(t){var r=this.__data__,n=r.array;return n?o(n,t):r.map.get(t)}var o=n(13);t.exports=e},function(t,r,n){function e(t){var r=this.__data__,n=r.array;return n?o(n,t):r.map.has(t)}var o=n(14);t.exports=e},function(t,r,n){function e(t,r){var n=this.__data__,e=n.array;e&&(e.length<i-1?a(e,t,r):(n.array=null,n.map=new o(e)));var u=n.map;return u&&u.set(t,r),this}var o=n(25),a=n(15),i=200;t.exports=e},function(t,r){function n(t,r){return t===r||t!==t&&r!==r}t.exports=n},function(t,r,n){function e(t){return o(t)&&u.call(t,"callee")&&(!f.call(t,"callee")||c.call(t)==a)}var o=n(62),a="[object Arguments]",i=Object.prototype,u=i.hasOwnProperty,c=i.toString,f=i.propertyIsEnumerable;t.exports=e},function(t,r,n){function e(t){return a(t)&&o(t)}var o=n(20),a=n(4);t.exports=e},function(t,r,n){function e(t,r){return o(t,r)}var o=n(32);t.exports=e},function(t,r,n){function e(t){return null==t?!1:o(t)?l.test(s.call(t)):i(t)&&(a(t)?l:c).test(t)}var o=n(21),a=n(19),i=n(4),u=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,f=Object.prototype,s=Function.prototype.toString,p=f.hasOwnProperty,l=RegExp("^"+s.call(p).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=e},function(t,r,n){function e(t){return"string"==typeof t||!o(t)&&a(t)&&c.call(t)==i}var o=n(9),a=n(4),i="[object String]",u=Object.prototype,c=u.toString;t.exports=e},function(t,r,n){function e(t){return a(t)&&o(t.length)&&!!k[M.call(t)]}var o=n(10),a=n(4),i="[object Arguments]",u="[object Array]",c="[object Boolean]",f="[object Date]",s="[object Error]",p="[object Function]",l="[object Map]",v="[object Number]",h="[object Object]",y="[object RegExp]",d="[object Set]",b="[object String]",_="[object WeakMap]",g="[object ArrayBuffer]",m="[object Float32Array]",x="[object Float64Array]",j="[object Int8Array]",w="[object Int16Array]",A="[object Int32Array]",O="[object Uint8Array]",S="[object Uint8ClampedArray]",E="[object Uint16Array]",P="[object Uint32Array]",k={};k[m]=k[x]=k[j]=k[w]=k[A]=k[O]=k[S]=k[E]=k[P]=!0,k[i]=k[u]=k[g]=k[c]=k[f]=k[s]=k[p]=k[l]=k[v]=k[h]=k[y]=k[d]=k[b]=k[_]=!1;var I=Object.prototype,M=I.toString;t.exports=e},function(t,r,n){function e(t){var r=f(t);if(!r&&!u(t))return a(t);var n=i(t),e=!!n,s=n||[],p=s.length;for(var l in t)!o(t,l)||e&&("length"==l||c(l,p))||r&&"constructor"==l||s.push(l);return s}var o=n(16),a=n(34),i=n(45),u=n(20),c=n(46),f=n(47);t.exports=e},function(t,r){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.normalizr=e():t.normalizr=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,r){t[e]=r}function i(t,e,r,n){var i=n.assignEntity,a=void 0===i?o:i,u={};for(var c in t)if(t.hasOwnProperty(c)){var f=l(t[c],e[c],r,n);a.call(null,u,c,f,t)}return u}function a(t,e,r,n){return function(t){return l(t,e,r,n)}}function u(t,e,r,n){return function(o){var i=t.getSchemaKey(o),a=l(o,e[i],r,n);return{id:a,schema:i}}}function c(t,e,r,n){var o=e.getItemSchema(),i=a(e,o,r,n);return Array.isArray(t)?t.map(i):Object.keys(t).reduce(function(e,r){return e[r]=i(t[r]),e},{})}function f(t,e,r,n){var o=e.getItemSchema();return u(e,o,r,n)(t)}function s(t,e,r){for(var n in e)e.hasOwnProperty(n)&&(t.hasOwnProperty(n)&&!O["default"](t[n],e[n])?console.warn("When merging two "+r+', found unequal data in their "'+n+'" values. Using the earlier value.',t[n],e[n]):t[n]=e[n])}function p(t,e,r,n){var o=n.mergeIntoEntity,a=void 0===o?s:o,u=e.getKey(),c=e.getId(t);r.hasOwnProperty(u)||(r[u]={}),r[u].hasOwnProperty(c)||(r[u][c]={});var f=r[u][c],p=i(t,e,r,n);return a(f,p,u),c}function l(t,e,r,n){return S["default"](t)&&S["default"](e)?e instanceof b["default"]?p(t,e,r,n):e instanceof g["default"]?c(t,e,r,n):e instanceof m["default"]?f(t,e,r,n):i(t,e,r,n):t}function h(t,e){return new g["default"](t,e)}function v(t,e){return new g["default"](t,e)}function _(t,e){return new m["default"](t,e)}function y(t,e){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if(!S["default"](t))throw new Error("Normalize accepts an object or an array as its input.");if(!S["default"](e)||Array.isArray(e))throw new Error("Normalize accepts an object for schema.");var n={},o=l(t,e,n,r);return{entities:n,result:o}}e.__esModule=!0,e.arrayOf=h,e.valuesOf=v,e.unionOf=_,e.normalize=y;var d=r(20),b=n(d),x=r(21),g=n(x),j=r(11),m=n(j),w=r(74),O=n(w),A=r(3),S=n(A);e.Schema=b["default"]},function(t,e,r){(function(t,n){var o=r(37),i={"function":!0,object:!0},a=i[typeof e]&&e&&!e.nodeType?e:void 0,u=i[typeof t]&&t&&!t.nodeType?t:void 0,c=o(a&&u&&"object"==typeof n&&n),f=o(i[typeof self]&&self),s=o(i[typeof window]&&window),p=o(i[typeof this]&&this),l=c||s!==(p&&p.window)&&s||f||p||Function("return this")();t.exports=l}).call(e,r(79)(t),function(){return this}())},function(t,e,r){function n(t,e){var r=t[e];return o(r)?r:void 0}var o=r(75);t.exports=n},function(t,e){function r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=r},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var o=r(52),i=r(53),a=r(54),u=r(55),c=r(56);n.prototype.clear=o,n.prototype["delete"]=i,n.prototype.get=a,n.prototype.has=u,n.prototype.set=c,t.exports=n},function(t,e,r){function n(t,e){for(var r=t.length;r--;)if(o(t[r][0],e))return r;return-1}var o=r(71);t.exports=n},function(t,e,r){function n(t,e){var r=t.__data__;return o(e)?r["string"==typeof e?"string":"hash"]:r.map}var o=r(50);t.exports=n},function(t,e,r){var n=r(2),o=n(Object,"create");t.exports=o},function(t,e){function r(t){return!!t&&"object"==typeof t}t.exports=r},function(t,e){var r=Array.isArray;t.exports=r},function(t,e){function r(t){return"number"==typeof t&&t>-1&&t%1==0&&n>=t}var n=9007199254740991;t.exports=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=r(3),a=n(i),u=function(){function t(e,r){if(o(this,t),!a["default"](e))throw new Error("UnionSchema requires item schema to be an object.");if(!r||!r.schemaAttribute)throw new Error("UnionSchema requires schemaAttribute option.");this._itemSchema=e;var n=r.schemaAttribute;this._getSchema="function"==typeof n?n:function(t){return t[n]}}return t.prototype.getItemSchema=function(){return this._itemSchema},t.prototype.getSchemaKey=function(t){return this._getSchema(t)},t}();e["default"]=u,t.exports=e["default"]},function(t,e,r){var n=r(2),o=r(1),i=n(o,"Map");t.exports=i},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var o=r(57),i=r(58),a=r(59),u=r(60),c=r(61);n.prototype.clear=o,n.prototype["delete"]=i,n.prototype.get=a,n.prototype.has=u,n.prototype.set=c,t.exports=n},function(t,e,r){function n(t,e){return a.call(t,e)||"object"==typeof t&&e in t&&null===o(t)}var o=r(41),i=Object.prototype,a=i.hasOwnProperty;t.exports=n},function(t,e,r){function n(t,e,r,n,c,f){var s=c&u,p=t.length,l=e.length;if(p!=l&&!(s&&l>p))return!1;var h=f.get(t);if(h)return h==e;var v=-1,_=!0,y=c&a?new o:void 0;for(f.set(t,e);++v<p;){var d=t[v],b=e[v];if(n)var x=s?n(b,d,v,e,t,f):n(d,b,v,t,e,f);if(void 0!==x){if(x)continue;_=!1;break}if(y){if(!i(e,function(t,e){return y.has(e)||d!==t&&!r(d,t,n,c,f)?void 0:y.add(e)})){_=!1;break}}else if(d!==b&&!r(d,b,n,c,f)){_=!1;break}}return f["delete"](t),_}var o=r(26),i=r(31),a=1,u=2;t.exports=n},function(t,e){function r(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(r){}return e}t.exports=r},function(t,e){function r(t){if(null!=t){try{return n.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var n=Function.prototype.toString;t.exports=r},function(t,e,r){function n(t){return null!=t&&a(o(t))&&!i(t)}var o=r(40),i=r(19),a=r(10);t.exports=n},function(t,e,r){function n(t){var e=o(t)?c.call(t):"";return e==i||e==a}var o=r(3),i="[object Function]",a="[object GeneratorFunction]",u=Object.prototype,c=u.toString;t.exports=n},function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var n=function(){function t(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(r(this,t),!e||"string"!=typeof e)throw new Error("A string non-empty key is required");this._key=e;var o=n.idAttribute||"id";this._getId="function"==typeof o?o:function(t){return t[o]},this._idAttribute=o}return t.prototype.getKey=function(){return this._key},t.prototype.getId=function(t){return this._getId(t)},t.prototype.getIdAttribute=function(){return this._idAttribute},t.prototype.define=function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])},t}();e["default"]=n,t.exports=e["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=r(3),a=n(i),u=r(11),c=n(u),f=function(){function t(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(o(this,t),!a["default"](e))throw new Error("ArraySchema requires item schema to be an object.");if(r.schemaAttribute){var n=r.schemaAttribute;this._itemSchema=new c["default"](e,{schemaAttribute:n})}else this._itemSchema=e}return t.prototype.getItemSchema=function(){return this._itemSchema},t}();e["default"]=f,t.exports=e["default"]},function(t,e,r){var n=r(2),o=r(1),i=n(o,"DataView");t.exports=i},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var o=r(43),i=r(44),a=r(45),u=r(46),c=r(47);n.prototype.clear=o,n.prototype["delete"]=i,n.prototype.get=a,n.prototype.has=u,n.prototype.set=c,t.exports=n},function(t,e,r){var n=r(2),o=r(1),i=n(o,"Promise");t.exports=i},function(t,e,r){var n=r(2),o=r(1),i=n(o,"Set");t.exports=i},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.__data__=new o;++e<r;)this.add(t[e])}var o=r(13),i=r(63),a=r(64);n.prototype.add=n.prototype.push=i,n.prototype.has=a,t.exports=n},function(t,e,r){function n(t){this.__data__=new o(t)}var o=r(4),i=r(66),a=r(67),u=r(68),c=r(69),f=r(70);n.prototype.clear=i,n.prototype["delete"]=a,n.prototype.get=u,n.prototype.has=c,n.prototype.set=f,t.exports=n},function(t,e,r){var n=r(1),o=n.Symbol;t.exports=o},function(t,e,r){var n=r(1),o=n.Uint8Array;t.exports=o},function(t,e,r){var n=r(2),o=r(1),i=n(o,"WeakMap");t.exports=i},function(t,e){function r(t,e){for(var r=-1,n=t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}t.exports=r},function(t,e,r){function n(t,e,r,u,c){return t===e?!0:null==t||null==e||!i(t)&&!a(e)?t!==t&&e!==e:o(t,e,n,r,u,c)}var o=r(33),i=r(3),a=r(8);t.exports=n},function(t,e,r){function n(t,e,r,n,y,b){var x=f(t),g=f(e),j=v,m=v;x||(j=c(t),j=j==h?_:j),g||(m=c(e),m=m==h?_:m);var w=j==_&&!s(t),O=m==_&&!s(e),A=j==m;if(A&&!w)return b||(b=new o),x||p(t)?i(t,e,r,n,y,b):a(t,e,j,r,n,y,b);if(!(y&l)){var S=w&&d.call(t,"__wrapped__"),E=O&&d.call(e,"__wrapped__");if(S||E){var P=S?t.value():t,k=E?e.value():e;return b||(b=new o),r(P,k,n,y,b)}}return A?(b||(b=new o),u(t,e,r,n,y,b)):!1}var o=r(27),i=r(15),a=r(38),u=r(39),c=r(42),f=r(9),s=r(16),p=r(77),l=2,h="[object Arguments]",v="[object Array]",_="[object Object]",y=Object.prototype,d=y.hasOwnProperty;t.exports=n},function(t,e){function r(t){return n(Object(t))}var n=Object.keys;t.exports=r},function(t,e){function r(t){return function(e){return null==e?void 0:e[t]}}t.exports=r},function(t,e){function r(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}t.exports=r},function(t,e){function r(t){return t&&t.Object===Object?t:null}t.exports=r},function(t,e,r){function n(t,e,r,n,o,m,O){switch(r){case j:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case g:return!(t.byteLength!=e.byteLength||!n(new i(t),new i(e)));case p:case l:return+t==+e;case h:return t.name==e.name&&t.message==e.message;case _:return t!=+t?e!=+e:t==+e;case y:case b:return t==e+"";case v:var A=u;case d:var S=m&s;if(A||(A=c),t.size!=e.size&&!S)return!1;var E=O.get(t);return E?E==e:(m|=f,O.set(t,e),a(A(t),A(e),n,o,m,O));case x:if(w)return w.call(t)==w.call(e)}return!1}var o=r(28),i=r(29),a=r(15),u=r(62),c=r(65),f=1,s=2,p="[object Boolean]",l="[object Date]",h="[object Error]",v="[object Map]",_="[object Number]",y="[object RegExp]",d="[object Set]",b="[object String]",x="[object Symbol]",g="[object ArrayBuffer]",j="[object DataView]",m=o?o.prototype:void 0,w=m?m.valueOf:void 0;t.exports=n},function(t,e,r){function n(t,e,r,n,u,c){var f=u&a,s=i(t),p=s.length,l=i(e),h=l.length;if(p!=h&&!f)return!1;for(var v=p;v--;){var _=s[v];if(!(f?_ in e:o(e,_)))return!1}var y=c.get(t);if(y)return y==e;var d=!0;c.set(t,e);for(var b=f;++v<p;){_=s[v];var x=t[_],g=e[_];if(n)var j=f?n(g,x,_,e,t,c):n(x,g,_,t,e,c);if(!(void 0===j?x===g||r(x,g,n,u,c):j)){d=!1;break}b||(b="constructor"==_)}if(d&&!b){var m=t.constructor,w=e.constructor;m!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof w&&w instanceof w)&&(d=!1)}return c["delete"](t),d}var o=r(14),i=r(78),a=2;t.exports=n},function(t,e,r){var n=r(35),o=n("length");t.exports=o},function(t,e){function r(t){return n(Object(t))}var n=Object.getPrototypeOf;t.exports=r},function(t,e,r){function n(t){return d.call(t)}var o=r(22),i=r(12),a=r(24),u=r(25),c=r(30),f=r(17),s="[object Map]",p="[object Object]",l="[object Promise]",h="[object Set]",v="[object WeakMap]",_="[object DataView]",y=Object.prototype,d=y.toString,b=f(o),x=f(i),g=f(a),j=f(u),m=f(c);(o&&n(new o(new ArrayBuffer(1)))!=_||i&&n(new i)!=s||a&&n(a.resolve())!=l||u&&n(new u)!=h||c&&n(new c)!=v)&&(n=function(t){var e=d.call(t),r=e==p?t.constructor:void 0,n=r?f(r):void 0;if(n)switch(n){case b:return _;case x:return s;case g:return l;case j:return h;case m:return v}return e}),t.exports=n},function(t,e,r){function n(){this.__data__=o?o(null):{}}var o=r(7);t.exports=n},function(t,e){function r(t){return this.has(t)&&delete this.__data__[t]}t.exports=r},function(t,e,r){function n(t){var e=this.__data__;if(o){var r=e[t];return r===i?void 0:r}return u.call(e,t)?e[t]:void 0}var o=r(7),i="__lodash_hash_undefined__",a=Object.prototype,u=a.hasOwnProperty;t.exports=n},function(t,e,r){function n(t){var e=this.__data__;return o?void 0!==e[t]:a.call(e,t)}var o=r(7),i=Object.prototype,a=i.hasOwnProperty;t.exports=n},function(t,e,r){function n(t,e){var r=this.__data__;return r[t]=o&&void 0===e?i:e,this}var o=r(7),i="__lodash_hash_undefined__";t.exports=n},function(t,e,r){function n(t){var e=t?t.length:void 0;return u(e)&&(a(t)||c(t)||i(t))?o(e,String):null}var o=r(36),i=r(72),a=r(9),u=r(10),c=r(76);t.exports=n},function(t,e){function r(t,e){return e=null==e?n:e,!!e&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&e>t}var n=9007199254740991,o=/^(?:0|[1-9]\d*)$/;t.exports=r},function(t,e){function r(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}t.exports=r},function(t,e){function r(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||n;return t===r}var n=Object.prototype;t.exports=r},function(t,e){function r(){this.__data__=[]}t.exports=r},function(t,e,r){function n(t){var e=this.__data__,r=o(e,t);if(0>r)return!1;var n=e.length-1;return r==n?e.pop():a.call(e,r,1),!0}var o=r(5),i=Array.prototype,a=i.splice;t.exports=n},function(t,e,r){function n(t){var e=this.__data__,r=o(e,t);return 0>r?void 0:e[r][1]}var o=r(5);t.exports=n},function(t,e,r){function n(t){return o(this.__data__,t)>-1}var o=r(5);t.exports=n},function(t,e,r){function n(t,e){var r=this.__data__,n=o(r,t);return 0>n?r.push([t,e]):r[n][1]=e,this}var o=r(5);t.exports=n},function(t,e,r){function n(){this.__data__={hash:new o,map:new(a||i),string:new o}}var o=r(23),i=r(4),a=r(12);t.exports=n},function(t,e,r){function n(t){return o(this,t)["delete"](t)}var o=r(6);t.exports=n},function(t,e,r){function n(t){return o(this,t).get(t)}var o=r(6);t.exports=n},function(t,e,r){function n(t){return o(this,t).has(t)}var o=r(6);t.exports=n},function(t,e,r){function n(t,e){return o(this,t).set(t,e),this}var o=r(6);t.exports=n},function(t,e){function r(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}t.exports=r},function(t,e){function r(t){return this.__data__.set(t,n),this}var n="__lodash_hash_undefined__";t.exports=r},function(t,e){function r(t){return this.__data__.has(t)}t.exports=r},function(t,e){function r(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}t.exports=r},function(t,e,r){function n(){this.__data__=new o}var o=r(4);t.exports=n},function(t,e){function r(t){return this.__data__["delete"](t)}t.exports=r},function(t,e){function r(t){return this.__data__.get(t)}t.exports=r},function(t,e){function r(t){return this.__data__.has(t)}t.exports=r},function(t,e,r){function n(t,e){var r=this.__data__;return r instanceof o&&r.__data__.length==a&&(r=this.__data__=new i(r.__data__)),r.set(t,e),this}var o=r(4),i=r(13),a=200;t.exports=n},function(t,e){function r(t,e){return t===e||t!==t&&e!==e}t.exports=r},function(t,e,r){function n(t){return o(t)&&u.call(t,"callee")&&(!f.call(t,"callee")||c.call(t)==i)}var o=r(73),i="[object Arguments]",a=Object.prototype,u=a.hasOwnProperty,c=a.toString,f=a.propertyIsEnumerable;t.exports=n},function(t,e,r){function n(t){return i(t)&&o(t)}var o=r(18),i=r(8);t.exports=n},function(t,e,r){function n(t,e){return o(t,e)}var o=r(32);t.exports=n},function(t,e,r){function n(t){if(!a(t))return!1;var e=o(t)||i(t)?h:f;return e.test(u(t))}var o=r(19),i=r(16),a=r(3),u=r(17),c=/[\\^$.*+?()[\]{}|]/g,f=/^\[object .+?Constructor\]$/,s=Object.prototype,p=Function.prototype.toString,l=s.hasOwnProperty,h=RegExp("^"+p.call(l).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=n},function(t,e,r){function n(t){return"string"==typeof t||!o(t)&&i(t)&&c.call(t)==a}var o=r(9),i=r(8),a="[object String]",u=Object.prototype,c=u.toString;t.exports=n},function(t,e,r){function n(t){return i(t)&&o(t.length)&&!!I[z.call(t)]}var o=r(10),i=r(8),a="[object Arguments]",u="[object Array]",c="[object Boolean]",f="[object Date]",s="[object Error]",p="[object Function]",l="[object Map]",h="[object Number]",v="[object Object]",_="[object RegExp]",y="[object Set]",d="[object String]",b="[object WeakMap]",x="[object ArrayBuffer]",g="[object DataView]",j="[object Float32Array]",m="[object Float64Array]",w="[object Int8Array]",O="[object Int16Array]",A="[object Int32Array]",S="[object Uint8Array]",E="[object Uint8ClampedArray]",P="[object Uint16Array]",k="[object Uint32Array]",I={};I[j]=I[m]=I[w]=I[O]=I[A]=I[S]=I[E]=I[P]=I[k]=!0,I[a]=I[u]=I[x]=I[c]=I[g]=I[f]=I[s]=I[p]=I[l]=I[h]=I[v]=I[_]=I[y]=I[d]=I[b]=!1;var M=Object.prototype,z=M.toString;t.exports=n},function(t,e,r){function n(t){var e=f(t);if(!e&&!u(t))return i(t);var r=a(t),n=!!r,s=r||[],p=s.length;for(var l in t)!o(t,l)||n&&("length"==l||c(l,p))||e&&"constructor"==l||s.push(l);return s}var o=r(14),i=r(34),a=r(48),u=r(18),c=r(49),f=r(51);t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}}])});

@@ -152,3 +152,3 @@ 'use strict';

if (!_lodashIsObject2['default'](obj) && !Array.isArray(obj)) {
if (!_lodashIsObject2['default'](obj)) {
throw new Error('Normalize accepts an object or an array as its input.');

@@ -155,0 +155,0 @@ }

{
"name": "normalizr",
"version": "2.0.1",
"description": "Normalizes JSON according to schema for Flux application",
"version": "2.0.2",
"description": "Normalizes JSON according to schema for Redux and Flux applications",
"main": "lib/index.js",
"repository": {
"type": "git",
"url": "https://github.com/gaearon/normalizr.git"
"url": "https://github.com/paularmstrong/normalizr.git"
},

@@ -22,7 +22,10 @@ "keywords": [

"author": "Dan Abramov",
"contributors": [
"Paul Armstrong"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/gaearon/normalizr/issues"
"url": "https://github.com/paularmstrong/normalizr/issues"
},
"homepage": "https://github.com/gaearon/normalizr",
"homepage": "https://github.com/paularmstrong/normalizr",
"scripts": {

@@ -45,4 +48,4 @@ "test": "mocha --compilers js:babel/register --recursive",

"dependencies": {
"lodash": "^4.0.0"
"lodash": "^4.11.2"
}
}

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

# normalizr [![build status](https://img.shields.io/travis/gaearon/normalizr/master.svg?style=flat-square)](https://travis-ci.org/gaearon/normalizr) [![npm version](https://img.shields.io/npm/v/normalizr.svg?style=flat-square)](https://www.npmjs.com/package/normalizr) [![npm downloads](https://img.shields.io/npm/dm/normalizr.svg?style=flat-square)](https://www.npmjs.com/package/normalizr)
# normalizr [![build status](https://img.shields.io/travis/paularmstrong/normalizr/master.svg?style=flat-square)](https://travis-ci.org/paularmstrong/normalizr) [![npm version](https://img.shields.io/npm/v/normalizr.svg?style=flat-square)](https://www.npmjs.com/package/normalizr) [![npm downloads](https://img.shields.io/npm/dm/normalizr.svg?style=flat-square)](https://www.npmjs.com/package/normalizr)

@@ -568,1 +568,6 @@ Normalizes deeply nested JSON API responses according to a schema for [Flux](https://facebook.github.io/flux) and [Redux](http://rackt.github.io/redux) apps.

```
## Credits
Normalizr was originally created by [Dan Abramov](http://github.com/gaearon) and inspired by a conversation with [Jing Chen](https://twitter.com/jingc).
It has since received contributions from different [community members](https://github.com/gaearon/normalizr/graphs/contributors).

@@ -125,3 +125,3 @@ import EntitySchema from './EntitySchema';

export function normalize(obj, schema, options = {}) {
if (!isObject(obj) && !Array.isArray(obj)) {
if (!isObject(obj)) {
throw new Error('Normalize accepts an object or an array as its input.');

@@ -128,0 +128,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