index.js 825 B

1
  1. (()=>{var r={};(()=>{var t=r;function e(r,t){return function(r){return"[object Object]"===Object.prototype.toString.call(r)}(r)?void 0===r[t]||function(r,t){return Object.prototype.hasOwnProperty.call(r,t)}(r,t):!!Array.isArray(r)&&!isNaN(parseInt(t,10))}t.set=function(r,t,n){for(var o=t.split("."),i=o.pop(),a=r,p=0;p<o.length;p++){var u=o[p];if(!e(r,u))return a;r[u]=r[u]||{},r=r[u]}return e(r,i)&&(r[i]=n),a},t.get=function(r,t){for(var e=t.split("."),n=e.pop(),o=0;o<e.length;o++){var i=e[o];if(!r[i])return;r=r[i]}return r[n]},t.delete=function(r,t){for(var n=t.split("."),o=n.pop(),i=0;i<n.length;i++){var a=n[i];if(!r[a])return;if(!e(r,a))return;r=r[a]}e(r,o)&&(Array.isArray(r)?r.splice(o,1):delete r[o])}})();var t=exports;for(var e in r)t[e]=r[e];r.__esModule&&Object.defineProperty(t,"__esModule",{value:!0})})();