Comparing version 1.0.0 to 1.0.1
@@ -502,7 +502,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
if (!isCloneable(object)) { | ||
return emptyChild; | ||
} | ||
return isArray(object) === isArray(emptyChild) ? cloneIfPossible(object) : emptyChild; | ||
return isCloneable(object) && isArray(object) === isArray(emptyChild) ? getShallowClone(object) : emptyChild; | ||
}; | ||
@@ -509,0 +505,0 @@ |
@@ -1,1 +0,1 @@ | ||
!(function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("unchanged",[],t):"object"==typeof exports?exports.unchanged=t():n.unchanged=t()})("undefined"!=typeof self?self:this,(function(){return (function(n){function t(r){if(e[r])return e[r].exports;var u=e[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var e={};return t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:r})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=0)})([(function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol?Symbol("placeholder"):60881,u=function(n,t){var e=n.map((function(n){return n===r&&t.length?t.shift():n}));return t.length?e.concat(t):e},o=function(n,t){for(var e=0;e<t;e++)if(n[e]===r)return!0;return!1},c=function(n){var t=n.length;return function e(){for(var r=arguments.length,c=Array(r),i=0;i<r;i++)c[i]=arguments[i];return c.length>=t&&!o(c,t)?n.apply(void 0,c):function(){for(var n=arguments.length,t=Array(n),r=0;r<n;r++)t[r]=arguments[r];return e.apply(void 0,u(c,t))}}},i=e(1);e.d(t,"get",(function(){return f})),e.d(t,"has",(function(){return a})),e.d(t,"merge",(function(){return s})),e.d(t,"remove",(function(){return l})),e.d(t,"set",(function(){return d})),e.d(t,"add",(function(){return p})),e.d(t,"__",(function(){return r}));var f=c((function(n,t){return Object(i.h)(n)?t:Object(i.c)(n,t)})),a=c((function(n,t){return Object(i.h)(n)?!!t:Object(i.e)(n,t)})),s=c((function(n,t,e){return Object(i.g)(e)?Object(i.h)(n)?Object(i.b)(e,t):Object(i.a)(n,e,(function(n,e){n[e]=Object(i.b)(n[e],t)})):t})),l=c((function(n,t){return Object(i.h)(n)?Object(i.d)(t):Object(i.e)(n,t)?Object(i.a)(n,t,(function(n,t){Object(i.f)(n)?n.splice(t,1):delete n[t]})):t})),d=c((function(n,t,e){return Object(i.h)(n)?t:Object(i.a)(n,e,(function(n,e){n[e]=t}))})),p=c((function(n,t,e){var r=f(n,e),u=Object(i.f)(r)?(Object(i.h)(n)?"":n)+"["+r.length+"]":n;return d(u,t,e)}))}),(function(n,t,e){"use strict";(function(n){e.d(t,"f",(function(){return i})),e.d(t,"g",(function(){return f})),e.d(t,"d",(function(){return d})),e.d(t,"b",(function(){return h})),e.d(t,"c",(function(){return j})),e.d(t,"a",(function(){return O})),e.d(t,"e",(function(){return g})),e.d(t,"h",(function(){return m}));var r=e(3),u=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103,c=/^\s*function\s*([^\(]*)/i,i=Array.isArray,f=function(n){return!!n&&"object"==typeof n&&!(n instanceof Date||n instanceof RegExp)&&n.$$typeof!==o},a=function(t){return"function"==typeof t&&("undefined"!=typeof window?window:n)[t.name||Function.prototype.toString.call(t).split(c)[1]]===t},s=function(n){return i(n)?[].concat(n):n.constructor===Object?u({},n):a(n.constructor)?{}:Object.keys(n).reduce((function(t,e){return t[e]=n[e],t}),Object.create(Object.getPrototypeOf(n)))},l=function(n){return"number"==typeof n?[]:{}},d=function(n){return i(n)?[]:{}},p=function(n){return f(n)?s(n):n},b=function(n,t){var e=l(t);return f(n)&&i(n)===i(e)?p(n):e},y=function n(t,e,r,u,o){var c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,i=t[c],f=c+1;if(f===t.length){var a=e||u?r(e,i):o;return u?e:a}return u?(e[i]=n(t,b(e[i],t[f]),r,u,o,f),e):e&&e[i]?n(t,e[i],r,u,o,f):o},h=function n(t,e){var r=i(t);if(r!==i(e))return p(e);if(r)return[].concat(t,e.map(p));var u=f(t)?Object.keys(t).reduce((function(n,e){return n[e]=p(t[e]),n}),{}):{};return Object.keys(e).reduce((function(r,u){return r[u]=f(e[u])?n(t[u],e[u]):e[u],r}),u)},v=function(n){return i(n)?n:Object(r.a)(n)},j=function(n,t){var e=v(n);return 1===e.length?t?t[e[0]]:void 0:y(e,t,(function(n,t){return n[t]}))},O=function(n,t,e){var r=v(n),u=f(t)?s(t):l(r[0]);return 1===r.length?(e(u,r[0]),u):y(r,u,e,!0)},g=function(n,t){var e=v(n);return 1===e.length?!!t&&void 0!==t[e[0]]:y(e,t,(function(n,t){return!!n&&void 0!==n[t]}),!1,!1)},m=function(n){return void 0===n||null===n||i(n)&&!n.length}}).call(t,e(2))}),(function(n,t){var e;e=(function(){return this})();try{e=e||Function("return this")()||(0,eval)("this")}catch(n){"object"==typeof window&&(e=window)}n.exports=e}),(function(n,t,e){"use strict";var r={clear:function(){r.results={},r.size=0},results:{},size:0},u=/"[^"]+"|`[^`]+`|'[^']+'|[^.[\]]+/g,o=/^\d+$/i,c=/^"[^"]+"|`[^`]+`|'[^']+'$/,i=function(n){return!!n.length&&o.test(n)},f=function(n){return c.test(n)},a=function(n){var t=f(n)?n.substring(1,n.length-1):n;return i(t)?+t:t},s=function(n){return r.results[n]?r.results[n]:(r.size>500&&r.clear(),r.results[n]=n?n.match(u).map(a):[n],r.size++,r.results[n])};e.d(t,"a",(function(){return l}));var l=function(n){return"string"==typeof n?s(n):Array.isArray(n)?n.map(a):["number"==typeof n?n:""+n]}})])})); | ||
!(function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("unchanged",[],t):"object"==typeof exports?exports.unchanged=t():n.unchanged=t()})("undefined"!=typeof self?self:this,(function(){return (function(n){function t(r){if(e[r])return e[r].exports;var u=e[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var e={};return t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:r})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=0)})([(function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol?Symbol("placeholder"):60881,u=function(n,t){var e=n.map((function(n){return n===r&&t.length?t.shift():n}));return t.length?e.concat(t):e},o=function(n,t){for(var e=0;e<t;e++)if(n[e]===r)return!0;return!1},c=function(n){var t=n.length;return function e(){for(var r=arguments.length,c=Array(r),i=0;i<r;i++)c[i]=arguments[i];return c.length>=t&&!o(c,t)?n.apply(void 0,c):function(){for(var n=arguments.length,t=Array(n),r=0;r<n;r++)t[r]=arguments[r];return e.apply(void 0,u(c,t))}}},i=e(1);e.d(t,"get",(function(){return f})),e.d(t,"has",(function(){return a})),e.d(t,"merge",(function(){return s})),e.d(t,"remove",(function(){return l})),e.d(t,"set",(function(){return d})),e.d(t,"add",(function(){return p})),e.d(t,"__",(function(){return r}));var f=c((function(n,t){return Object(i.h)(n)?t:Object(i.c)(n,t)})),a=c((function(n,t){return Object(i.h)(n)?!!t:Object(i.e)(n,t)})),s=c((function(n,t,e){return Object(i.g)(e)?Object(i.h)(n)?Object(i.b)(e,t):Object(i.a)(n,e,(function(n,e){n[e]=Object(i.b)(n[e],t)})):t})),l=c((function(n,t){return Object(i.h)(n)?Object(i.d)(t):Object(i.e)(n,t)?Object(i.a)(n,t,(function(n,t){Object(i.f)(n)?n.splice(t,1):delete n[t]})):t})),d=c((function(n,t,e){return Object(i.h)(n)?t:Object(i.a)(n,e,(function(n,e){n[e]=t}))})),p=c((function(n,t,e){var r=f(n,e),u=Object(i.f)(r)?(Object(i.h)(n)?"":n)+"["+r.length+"]":n;return d(u,t,e)}))}),(function(n,t,e){"use strict";(function(n){e.d(t,"f",(function(){return i})),e.d(t,"g",(function(){return f})),e.d(t,"d",(function(){return d})),e.d(t,"b",(function(){return h})),e.d(t,"c",(function(){return j})),e.d(t,"a",(function(){return O})),e.d(t,"e",(function(){return g})),e.d(t,"h",(function(){return m}));var r=e(3),u=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103,c=/^\s*function\s*([^\(]*)/i,i=Array.isArray,f=function(n){return!!n&&"object"==typeof n&&!(n instanceof Date||n instanceof RegExp)&&n.$$typeof!==o},a=function(t){return"function"==typeof t&&("undefined"!=typeof window?window:n)[t.name||Function.prototype.toString.call(t).split(c)[1]]===t},s=function(n){return i(n)?[].concat(n):n.constructor===Object?u({},n):a(n.constructor)?{}:Object.keys(n).reduce((function(t,e){return t[e]=n[e],t}),Object.create(Object.getPrototypeOf(n)))},l=function(n){return"number"==typeof n?[]:{}},d=function(n){return i(n)?[]:{}},p=function(n){return f(n)?s(n):n},b=function(n,t){var e=l(t);return f(n)&&i(n)===i(e)?s(n):e},y=function n(t,e,r,u,o){var c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,i=t[c],f=c+1;if(f===t.length){var a=e||u?r(e,i):o;return u?e:a}return u?(e[i]=n(t,b(e[i],t[f]),r,u,o,f),e):e&&e[i]?n(t,e[i],r,u,o,f):o},h=function n(t,e){var r=i(t);if(r!==i(e))return p(e);if(r)return[].concat(t,e.map(p));var u=f(t)?Object.keys(t).reduce((function(n,e){return n[e]=p(t[e]),n}),{}):{};return Object.keys(e).reduce((function(r,u){return r[u]=f(e[u])?n(t[u],e[u]):e[u],r}),u)},v=function(n){return i(n)?n:Object(r.a)(n)},j=function(n,t){var e=v(n);return 1===e.length?t?t[e[0]]:void 0:y(e,t,(function(n,t){return n[t]}))},O=function(n,t,e){var r=v(n),u=f(t)?s(t):l(r[0]);return 1===r.length?(e(u,r[0]),u):y(r,u,e,!0)},g=function(n,t){var e=v(n);return 1===e.length?!!t&&void 0!==t[e[0]]:y(e,t,(function(n,t){return!!n&&void 0!==n[t]}),!1,!1)},m=function(n){return void 0===n||null===n||i(n)&&!n.length}}).call(t,e(2))}),(function(n,t){var e;e=(function(){return this})();try{e=e||Function("return this")()||(0,eval)("this")}catch(n){"object"==typeof window&&(e=window)}n.exports=e}),(function(n,t,e){"use strict";var r={clear:function(){r.results={},r.size=0},results:{},size:0},u=/"[^"]+"|`[^`]+`|'[^']+'|[^.[\]]+/g,o=/^\d+$/i,c=/^"[^"]+"|`[^`]+`|'[^']+'$/,i=function(n){return!!n.length&&o.test(n)},f=function(n){return c.test(n)},a=function(n){var t=f(n)?n.substring(1,n.length-1):n;return i(t)?+t:t},s=function(n){return r.results[n]?r.results[n]:(r.size>500&&r.clear(),r.results[n]=n?n.match(u).map(a):[n],r.size++,r.results[n])};e.d(t,"a",(function(){return l}));var l=function(n){return"string"==typeof n?s(n):Array.isArray(n)?n.map(a):["number"==typeof n?n:""+n]}})])})); |
@@ -125,7 +125,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
if (!isCloneable(object)) { | ||
return emptyChild; | ||
} | ||
return isArray(object) === isArray(emptyChild) ? cloneIfPossible(object) : emptyChild; | ||
return isCloneable(object) && isArray(object) === isArray(emptyChild) ? getShallowClone(object) : emptyChild; | ||
}; | ||
@@ -132,0 +128,0 @@ |
@@ -130,7 +130,3 @@ 'use strict'; | ||
if (!isCloneable(object)) { | ||
return emptyChild; | ||
} | ||
return isArray(object) === isArray(emptyChild) ? cloneIfPossible(object) : emptyChild; | ||
return isCloneable(object) && isArray(object) === isArray(emptyChild) ? getShallowClone(object) : emptyChild; | ||
}; | ||
@@ -137,0 +133,0 @@ |
@@ -6,8 +6,21 @@ { | ||
"failFast": true, | ||
"files": ["test/*.js"], | ||
"require": ["babel-register"], | ||
"source": ["src/*.js"], | ||
"files": [ | ||
"test/*.js" | ||
], | ||
"require": [ | ||
"babel-register" | ||
], | ||
"source": [ | ||
"src/*.js" | ||
], | ||
"verbose": true | ||
}, | ||
"browserslist": ["defaults", "Explorer >= 9", "Safari >= 6", "Opera >= 15", "iOS >= 8", "Android >= 4"], | ||
"browserslist": [ | ||
"defaults", | ||
"Explorer >= 9", | ||
"Safari >= 6", | ||
"Opera >= 15", | ||
"iOS >= 8", | ||
"Android >= 4" | ||
], | ||
"bugs": { | ||
@@ -19,3 +32,3 @@ "url": "https://github.com/planttheidea/unchanged/issues" | ||
}, | ||
"description": "A tiny, fast, unopinionated immutable handler for updating JS objects and arrays", | ||
"description": "A tiny, fast, unopinionated handler for updating JS objects and arrays immutably", | ||
"devDependencies": { | ||
@@ -48,3 +61,6 @@ "ava": "^0.24.0", | ||
}, | ||
"keywords": ["immutable", "functional"], | ||
"keywords": [ | ||
"immutable", | ||
"functional" | ||
], | ||
"license": "MIT", | ||
@@ -72,4 +88,3 @@ "homepage": "https://github.com/planttheidea/unchanged#readme", | ||
"prepublish": "if in-publish; then npm run prepublish:compile; fi", | ||
"prepublish:compile": | ||
"npm run lint && npm run test:coverage && npm run transpile:lib && npm run transpile:es && npm run dist", | ||
"prepublish:compile": "npm run lint && npm run test:coverage && npm run transpile:lib && npm run transpile:es && npm run dist", | ||
"start": "npm run dev", | ||
@@ -82,3 +97,3 @@ "test": "NODE_PATH=. NODE_ENV=production BABEL_ENV=test ava", | ||
}, | ||
"version": "1.0.0" | ||
"version": "1.0.1" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
346407
21
2275