Socket
Socket
Sign inDemoInstall

simple-update-in

Package Overview
Dependencies
0
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.3-master.fc7fc52 to 2.1.0

3

CHANGELOG.md

@@ -9,2 +9,3 @@ # Changelog

## [2.1.0] - 2019-07-18
### Changed

@@ -24,2 +25,4 @@ - Bump dependencies, in PR [#18](https://github.com/compulim/simple-update-in/pulls/18)

- [`rollup-plugin-uglify@^6.0.2`](https://www.npmjs.com/package/rollup-plugin-uglify)
- Use `Object.is` instead of `===` to check if value is updated or not, in PR [#21](https://github.com/compulim/simple-update-in/pull/21)
- `Object.is` correctly compare between `0` and `-0` (different), and `NaN` and `Number.NaN` (indifferent)

@@ -26,0 +29,0 @@ ### Added

4

dist/simple-update-in.development.js

@@ -502,3 +502,3 @@ (function (global, factory) {

} else {
if (nextValue === value) {
if (Object.is(nextValue, value)) {
return obj;

@@ -527,3 +527,3 @@ } else {

} else {
if (_nextValue === value) {
if (Object.is(_nextValue, value)) {
return obj;

@@ -530,0 +530,0 @@ } else {

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).simpleUpdateIn=e()}(this,function(){"use strict";function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function t(u){return function(){var t=this,i=arguments;return new Promise(function(e,r){var n=u.apply(t,i);function o(t){c(n,e,r,o,a,"next",t)}function a(t){c(n,e,r,o,a,"throw",t)}o(void 0)})}}function l(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(r,!0).forEach(function(t){l(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function b(t){return function(t){if(Array.isArray(t))return t}(t)||e(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function v(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||e(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function e(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function r(t,e,r){d(e);var n=function t(e,r){if(!r.length)return;var n=b(r),o=n[0],a=n.slice(1);if("function"==typeof o){var i=[];if(Array.isArray(e))for(var u=0,c=e.length;u<c;u++)o.call(e,e[u],u)&&i.push.apply(i,v(t(e,[u].concat(v(a)))));else for(var f in e||{})o.call(e,e[f],f)&&i.push.apply(i,v(t(e,[f].concat(v(a)))));return i}var s=t(void 0!==e&&e[o],a);return s?s.map(function(t){return[o].concat(v(t))}):[[o]]}(t,e),o=!0,a=!1,i=void 0;try{for(var u,c=n[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var f=u.value;t=g(t,f,r?r(x(t,f)):void 0)}}catch(t){a=!0,i=t}finally{try{o||null==c.return||c.return()}finally{if(a)throw i}}return t}function o(){return(o=t(regeneratorRuntime.mark(function t(e,r,n){var o,a,i,u,c,f,s;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return d(r),t.next=3,m(e,r);case 3:o=t.sent,i=!(a=!0),u=void 0,t.prev=7,c=o[Symbol.iterator]();case 9:if(a=(f=c.next()).done){t.next=26;break}if(s=f.value,t.t0=g,t.t1=e,t.t2=s,n)return t.next=17,n(x(e,s));t.next=20;break;case 17:t.t3=t.sent,t.next=21;break;case 20:t.t3=void 0;case 21:t.t4=t.t3,e=(0,t.t0)(t.t1,t.t2,t.t4);case 23:a=!0,t.next=9;break;case 26:t.next=32;break;case 28:t.prev=28,t.t5=t.catch(7),i=!0,u=t.t5;case 32:t.prev=32,t.prev=33,a||null==c.return||c.return();case 35:if(t.prev=35,i)throw u;t.next=38;break;case 38:return t.finish(35);case 39:return t.finish(32);case 40:return t.abrupt("return",e);case 41:case"end":return t.stop()}},t,null,[[7,28,32,40],[33,,35,39]])}))).apply(this,arguments)}function d(t){if(!Array.isArray(t))throw new Error("path must be an array")}r.updateInAsync=function(t,e,r){return o.apply(this,arguments)};var h=["__proto__","constructor","prototype"];function m(t,e){return a.apply(this,arguments)}function a(){return(a=t(regeneratorRuntime.mark(function t(e,r){var n,o,a,i,u,c,f,s;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r.length){t.next=2;break}return t.abrupt("return");case 2:if(n=b(r),o=n[0],a=n.slice(1),"function"!=typeof o){t.next=43;break}if(i=[],!Array.isArray(e)){t.next=25;break}u=0,c=e.length;case 7:if(u<c)return t.next=10,o.call(e,e[u],u);t.next=23;break;case 10:if(t.t0=t.sent,t.t0)return t.t1=i.push,t.t2=i,t.t3=v,t.next=17,m(e,[u].concat(v(a)));t.next=20;break;case 17:t.t4=t.sent,t.t5=(0,t.t3)(t.t4),t.t1.apply.call(t.t1,t.t2,t.t5);case 20:u++,t.next=7;break;case 23:t.next=42;break;case 25:t.t6=regeneratorRuntime.keys(e||{});case 26:if((t.t7=t.t6()).done){t.next=42;break}return f=t.t7.value,t.next=30,o.call(e,e[f],f);case 30:if(t.t8=t.sent,t.t8)return t.t9=i.push,t.t10=i,t.t11=v,t.next=37,m(e,[f].concat(v(a)));t.next=40;break;case 37:t.t12=t.sent,t.t13=(0,t.t11)(t.t12),t.t9.apply.call(t.t9,t.t10,t.t13);case 40:t.next=26;break;case 42:return t.abrupt("return",i);case 43:return t.next=45,m(void 0!==e&&e[o],a);case 45:return s=t.sent,t.abrupt("return",s?s.map(function(t){return[o].concat(v(t))}):[[o]]);case 47:case"end":return t.stop()}},t)}))).apply(this,arguments)}function x(t,e){return e.reduce(function(t,e){return t&&t[e]},t)}function g(t,e,r){if(!e.length)return r;var n,o=b(e),a=o[0],i=o.slice(1),u=void 0!==t&&t[a],c=t;if(n=a,h.includes(n))return t;if("string"!=typeof a||"object"===p(c)&&!Array.isArray(c)?"number"!=typeof a||Array.isArray(c)||(c=[]):c={},"number"==typeof a){var f=g(u,i,r);return void 0===f?void 0===t?t:(a in c&&(c=v(c)).splice(a,1),c):f===u?t:((c=v(c))[a]=f,c)}var s=g(u,i,r);return void 0===s?void 0===t?t:(a in c&&delete(c=y({},c))[a],c):s===u?t:y({},c,l({},a,s))}return r});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).simpleUpdateIn=e()}(this,function(){"use strict";function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function t(c){return function(){var t=this,i=arguments;return new Promise(function(e,r){var n=c.apply(t,i);function o(t){u(n,e,r,o,a,"next",t)}function a(t){u(n,e,r,o,a,"throw",t)}o(void 0)})}}function l(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(r,!0).forEach(function(t){l(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function b(t){return function(t){if(Array.isArray(t))return t}(t)||e(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function v(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||e(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function e(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function r(t,e,r){d(e);var n=function t(e,r){if(!r.length)return;var n=b(r),o=n[0],a=n.slice(1);if("function"==typeof o){var i=[];if(Array.isArray(e))for(var c=0,u=e.length;c<u;c++)o.call(e,e[c],c)&&i.push.apply(i,v(t(e,[c].concat(v(a)))));else for(var f in e||{})o.call(e,e[f],f)&&i.push.apply(i,v(t(e,[f].concat(v(a)))));return i}var s=t(void 0!==e&&e[o],a);return s?s.map(function(t){return[o].concat(v(t))}):[[o]]}(t,e),o=!0,a=!1,i=void 0;try{for(var c,u=n[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var f=c.value;t=g(t,f,r?r(x(t,f)):void 0)}}catch(t){a=!0,i=t}finally{try{o||null==u.return||u.return()}finally{if(a)throw i}}return t}function o(){return(o=t(regeneratorRuntime.mark(function t(e,r,n){var o,a,i,c,u,f,s;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return d(r),t.next=3,m(e,r);case 3:o=t.sent,i=!(a=!0),c=void 0,t.prev=7,u=o[Symbol.iterator]();case 9:if(a=(f=u.next()).done){t.next=26;break}if(s=f.value,t.t0=g,t.t1=e,t.t2=s,n)return t.next=17,n(x(e,s));t.next=20;break;case 17:t.t3=t.sent,t.next=21;break;case 20:t.t3=void 0;case 21:t.t4=t.t3,e=(0,t.t0)(t.t1,t.t2,t.t4);case 23:a=!0,t.next=9;break;case 26:t.next=32;break;case 28:t.prev=28,t.t5=t.catch(7),i=!0,c=t.t5;case 32:t.prev=32,t.prev=33,a||null==u.return||u.return();case 35:if(t.prev=35,i)throw c;t.next=38;break;case 38:return t.finish(35);case 39:return t.finish(32);case 40:return t.abrupt("return",e);case 41:case"end":return t.stop()}},t,null,[[7,28,32,40],[33,,35,39]])}))).apply(this,arguments)}function d(t){if(!Array.isArray(t))throw new Error("path must be an array")}r.updateInAsync=function(t,e,r){return o.apply(this,arguments)};var h=["__proto__","constructor","prototype"];function m(t,e){return a.apply(this,arguments)}function a(){return(a=t(regeneratorRuntime.mark(function t(e,r){var n,o,a,i,c,u,f,s;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r.length){t.next=2;break}return t.abrupt("return");case 2:if(n=b(r),o=n[0],a=n.slice(1),"function"!=typeof o){t.next=43;break}if(i=[],!Array.isArray(e)){t.next=25;break}c=0,u=e.length;case 7:if(c<u)return t.next=10,o.call(e,e[c],c);t.next=23;break;case 10:if(t.t0=t.sent,t.t0)return t.t1=i.push,t.t2=i,t.t3=v,t.next=17,m(e,[c].concat(v(a)));t.next=20;break;case 17:t.t4=t.sent,t.t5=(0,t.t3)(t.t4),t.t1.apply.call(t.t1,t.t2,t.t5);case 20:c++,t.next=7;break;case 23:t.next=42;break;case 25:t.t6=regeneratorRuntime.keys(e||{});case 26:if((t.t7=t.t6()).done){t.next=42;break}return f=t.t7.value,t.next=30,o.call(e,e[f],f);case 30:if(t.t8=t.sent,t.t8)return t.t9=i.push,t.t10=i,t.t11=v,t.next=37,m(e,[f].concat(v(a)));t.next=40;break;case 37:t.t12=t.sent,t.t13=(0,t.t11)(t.t12),t.t9.apply.call(t.t9,t.t10,t.t13);case 40:t.next=26;break;case 42:return t.abrupt("return",i);case 43:return t.next=45,m(void 0!==e&&e[o],a);case 45:return s=t.sent,t.abrupt("return",s?s.map(function(t){return[o].concat(v(t))}):[[o]]);case 47:case"end":return t.stop()}},t)}))).apply(this,arguments)}function x(t,e){return e.reduce(function(t,e){return t&&t[e]},t)}function g(t,e,r){if(!e.length)return r;var n,o=b(e),a=o[0],i=o.slice(1),c=void 0!==t&&t[a],u=t;if(n=a,h.includes(n))return t;if("string"!=typeof a||"object"===p(u)&&!Array.isArray(u)?"number"!=typeof a||Array.isArray(u)||(u=[]):u={},"number"==typeof a){var f=g(c,i,r);return void 0===f?void 0===t?t:(a in u&&(u=v(u)).splice(a,1),u):Object.is(f,c)?t:((u=v(u))[a]=f,u)}var s=g(c,i,r);return void 0===s?void 0===t?t:(a in u&&delete(u=y({},u))[a],u):Object.is(s,c)?t:y({},u,l({},a,s))}return r});

@@ -398,3 +398,3 @@ "use strict";

} else {
if (nextValue === value) {
if (Object.is(nextValue, value)) {
return obj;

@@ -423,3 +423,3 @@ } else {

} else {
if (_nextValue === value) {
if (Object.is(_nextValue, value)) {
return obj;

@@ -426,0 +426,0 @@ } else {

{
"name": "simple-update-in",
"version": "2.0.3-master.fc7fc52",
"version": "2.1.0",
"description": "",

@@ -5,0 +5,0 @@ "browser": "dist/simple-update-in.production.min.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc