object-flatten-all-arrays 6.0.1 → 6.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ This package is ESM only: Node 12+ is needed to use it and it must be imported i
|
|
|
32
32
|
npm i object-flatten-all-arrays
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
If you need a legacy version which works with require
|
|
35
|
+
If you need a legacy version which works with `require`, use version 5.1.0
|
|
36
36
|
|
|
37
37
|
## Quick Take
|
|
38
38
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name object-flatten-all-arrays
|
|
3
3
|
* @fileoverview Merge and flatten any arrays found in all values within plain objects
|
|
4
|
-
* @version 6.0.
|
|
4
|
+
* @version 6.0.2
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/object-flatten-all-arrays/}
|
|
@@ -11,7 +11,7 @@ import merge from 'lodash.merge';
|
|
|
11
11
|
import clone from 'lodash.clonedeep';
|
|
12
12
|
import isObj from 'lodash.isplainobject';
|
|
13
13
|
|
|
14
|
-
var version$1 = "6.0.
|
|
14
|
+
var version$1 = "6.0.2";
|
|
15
15
|
|
|
16
16
|
const version = version$1;
|
|
17
17
|
function flattenAllArrays(originalIncommingObj, originalOpts) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name object-flatten-all-arrays
|
|
3
3
|
* @fileoverview Merge and flatten any arrays found in all values within plain objects
|
|
4
|
-
* @version 6.0.
|
|
4
|
+
* @version 6.0.2
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/object-flatten-all-arrays/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self).objectFlattenAllArrays={})}(this,(function(t){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e={exports:{}};!function(t,e){var n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",u="[object Function]",c="[object Object]",a=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s[i]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s[u]=s["[object Map]"]=s["[object Number]"]=s[c]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var l="object"==typeof r&&r&&r.Object===Object&&r,p="object"==typeof self&&self&&self.Object===Object&&self,_=l||p||Function("return this")(),y=e&&!e.nodeType&&e,h=y&&t&&!t.nodeType&&t,v=h&&h.exports===y,b=v&&l.process,d=function(){try{var t=h&&h.require&&h.require("util").types;return t||b&&b.binding&&b.binding("util")}catch(t){}}(),g=d&&d.isTypedArray;function j(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}var A,O,w,m=Array.prototype,x=Object.prototype,S=_["__core-js_shared__"],z=Function.prototype.toString,E=x.hasOwnProperty,P=(A=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",F=x.toString,$=z.call(Object),T=RegExp("^"+z.call(E).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),I=v?_.Buffer:void 0,U=_.Symbol,B=_.Uint8Array,k=I?I.allocUnsafe:void 0,M=(O=Object.getPrototypeOf,w=Object,function(t){return O(w(t))}),C=Object.create,D=x.propertyIsEnumerable,R=m.splice,L=U?U.toStringTag:void 0,N=function(){try{var t=_t(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),V=I?I.isBuffer:void 0,W=Math.max,q=Date.now,G=_t(_,"Map"),H=_t(Object,"create"),J=function(){function t(){}return function(r){if(!xt(r))return{};if(C)return C(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}}();function K(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}function Q(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}function X(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}function Y(t){var r=this.__data__=new Q(t);this.size=r.size}function Z(t,r){var e=jt(t),n=!e&>(t),o=!e&&!n&&Ot(t),i=!e&&!n&&!o&&zt(t),u=e||n||o||i,c=u?function(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n}(t.length,String):[],a=c.length;for(var f in t)!r&&!E.call(t,f)||u&&("length"==f||o&&("offset"==f||"parent"==f)||i&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||yt(f,a))||c.push(f);return c}function tt(t,r,e){(void 0!==e&&!dt(t[r],e)||void 0===e&&!(r in t))&&nt(t,r,e)}function rt(t,r,e){var n=t[r];E.call(t,r)&&dt(n,e)&&(void 0!==e||r in t)||nt(t,r,e)}function et(t,r){for(var e=t.length;e--;)if(dt(t[e][0],r))return e;return-1}function nt(t,r,e){"__proto__"==r&&N?N(t,r,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[r]=e}K.prototype.clear=function(){this.__data__=H?H(null):{},this.size=0},K.prototype.delete=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r},K.prototype.get=function(t){var r=this.__data__;if(H){var e=r[t];return e===n?void 0:e}return E.call(r,t)?r[t]:void 0},K.prototype.has=function(t){var r=this.__data__;return H?void 0!==r[t]:E.call(r,t)},K.prototype.set=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=H&&void 0===r?n:r,this},Q.prototype.clear=function(){this.__data__=[],this.size=0},Q.prototype.delete=function(t){var r=this.__data__,e=et(r,t);return!(e<0)&&(e==r.length-1?r.pop():R.call(r,e,1),--this.size,!0)},Q.prototype.get=function(t){var r=this.__data__,e=et(r,t);return e<0?void 0:r[e][1]},Q.prototype.has=function(t){return et(this.__data__,t)>-1},Q.prototype.set=function(t,r){var e=this.__data__,n=et(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this},X.prototype.clear=function(){this.size=0,this.__data__={hash:new K,map:new(G||Q),string:new K}},X.prototype.delete=function(t){var r=pt(this,t).delete(t);return this.size-=r?1:0,r},X.prototype.get=function(t){return pt(this,t).get(t)},X.prototype.has=function(t){return pt(this,t).has(t)},X.prototype.set=function(t,r){var e=pt(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this},Y.prototype.clear=function(){this.__data__=new Q,this.size=0},Y.prototype.delete=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e},Y.prototype.get=function(t){return this.__data__.get(t)},Y.prototype.has=function(t){return this.__data__.has(t)},Y.prototype.set=function(t,r){var e=this.__data__;if(e instanceof Q){var n=e.__data__;if(!G||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new X(n)}return e.set(t,r),this.size=e.size,this};var ot,it=function(t,r,e){for(var n=-1,o=Object(t),i=e(t),u=i.length;u--;){var c=i[ot?u:++n];if(!1===r(o[c],c,o))break}return t};function ut(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":L&&L in Object(t)?function(t){var r=E.call(t,L),e=t[L];try{t[L]=void 0;var n=!0}catch(t){}var o=F.call(t);n&&(r?t[L]=e:delete t[L]);return o}(t):function(t){return F.call(t)}(t)}function ct(t){return St(t)&&ut(t)==i}function at(t){return!(!xt(t)||function(t){return!!P&&P in t}(t))&&(wt(t)?T:a).test(function(t){if(null!=t){try{return z.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function ft(t){if(!xt(t))return function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}(t);var r=ht(t),e=[];for(var n in t)("constructor"!=n||!r&&E.call(t,n))&&e.push(n);return e}function st(t,r,e,n,o){t!==r&&it(r,(function(i,u){if(o||(o=new Y),xt(i))!function(t,r,e,n,o,i,u){var a=vt(t,e),f=vt(r,e),s=u.get(f);if(s)return void tt(t,e,s);var l=i?i(a,f,e+"",t,r,u):void 0,p=void 0===l;if(p){var _=jt(f),y=!_&&Ot(f),h=!_&&!y&&zt(f);l=f,_||y||h?jt(a)?l=a:St(j=a)&&At(j)?l=function(t,r){var e=-1,n=t.length;r||(r=Array(n));for(;++e<n;)r[e]=t[e];return r}(a):y?(p=!1,l=function(t,r){if(r)return t.slice();var e=t.length,n=k?k(e):new t.constructor(e);return t.copy(n),n}(f,!0)):h?(p=!1,v=f,b=!0?(g=new(d=v.buffer).constructor(d.byteLength),new B(g).set(new B(d)),g):v.buffer,l=new v.constructor(b,v.byteOffset,v.length)):l=[]:function(t){if(!St(t)||ut(t)!=c)return!1;var r=M(t);if(null===r)return!0;var e=E.call(r,"constructor")&&r.constructor;return"function"==typeof e&&e instanceof e&&z.call(e)==$}(f)||gt(f)?(l=a,gt(a)?l=function(t){return function(t,r,e,n){var o=!e;e||(e={});var i=-1,u=r.length;for(;++i<u;){var c=r[i],a=n?n(e[c],t[c],c,e,t):void 0;void 0===a&&(a=t[c]),o?nt(e,c,a):rt(e,c,a)}return e}(t,Et(t))}(a):xt(a)&&!wt(a)||(l=function(t){return"function"!=typeof t.constructor||ht(t)?{}:J(M(t))}(f))):p=!1}var v,b,d,g;var j;p&&(u.set(f,l),o(l,f,n,i,u),u.delete(f));tt(t,e,l)}(t,r,u,e,st,n,o);else{var a=n?n(vt(t,u),i,u+"",t,r,o):void 0;void 0===a&&(a=i),tt(t,u,a)}}),Et)}function lt(t,r){return bt(function(t,r,e){return r=W(void 0===r?t.length-1:r,0),function(){for(var n=arguments,o=-1,i=W(n.length-r,0),u=Array(i);++o<i;)u[o]=n[r+o];o=-1;for(var c=Array(r+1);++o<r;)c[o]=n[o];return c[r]=e(u),j(t,this,c)}}(t,r,$t),t+"")}function pt(t,r){var e,n,o=t.__data__;return("string"==(n=typeof(e=r))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==e:null===e)?o["string"==typeof r?"string":"hash"]:o.map}function _t(t,r){var e=function(t,r){return null==t?void 0:t[r]}(t,r);return at(e)?e:void 0}function yt(t,r){var e=typeof t;return!!(r=null==r?o:r)&&("number"==e||"symbol"!=e&&f.test(t))&&t>-1&&t%1==0&&t<r}function ht(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||x)}function vt(t,r){if(("constructor"!==r||"function"!=typeof t[r])&&"__proto__"!=r)return t[r]}var bt=function(t){var r=0,e=0;return function(){var n=q(),o=16-(n-e);if(e=n,o>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}(N?function(t,r){return N(t,"toString",{configurable:!0,enumerable:!1,value:(e=r,function(){return e}),writable:!0});var e}:$t);function dt(t,r){return t===r||t!=t&&r!=r}var gt=ct(function(){return arguments}())?ct:function(t){return St(t)&&E.call(t,"callee")&&!D.call(t,"callee")},jt=Array.isArray;function At(t){return null!=t&&mt(t.length)&&!wt(t)}var Ot=V||function(){return!1};function wt(t){if(!xt(t))return!1;var r=ut(t);return r==u||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}function mt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}function xt(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}function St(t){return null!=t&&"object"==typeof t}var zt=g?function(t){return function(r){return t(r)}}(g):function(t){return St(t)&&mt(t.length)&&!!s[ut(t)]};function Et(t){return At(t)?Z(t,!0):ft(t)}var Pt,Ft=(Pt=function(t,r,e){st(t,r,e)},lt((function(t,r){var e=-1,n=r.length,o=n>1?r[n-1]:void 0,i=n>2?r[2]:void 0;for(o=Pt.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(t,r,e){if(!xt(e))return!1;var n=typeof r;return!!("number"==n?At(e)&&yt(r,e.length):"string"==n&&r in e)&&dt(e[r],t)}(r[0],r[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++e<n;){var u=r[e];u&&Pt(t,u,e,o)}return t})));function $t(t){return t}t.exports=Ft}(e,e.exports);var n=e.exports,o={exports:{}};!function(t,e){var n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",u="[object Boolean]",c="[object Date]",a="[object Function]",f="[object GeneratorFunction]",s="[object Map]",l="[object Number]",p="[object Object]",_="[object Promise]",y="[object RegExp]",h="[object Set]",v="[object String]",b="[object Symbol]",d="[object WeakMap]",g="[object ArrayBuffer]",j="[object DataView]",A="[object Float32Array]",O="[object Float64Array]",w="[object Int8Array]",m="[object Int16Array]",x="[object Int32Array]",S="[object Uint8Array]",z="[object Uint8ClampedArray]",E="[object Uint16Array]",P="[object Uint32Array]",F=/\w*$/,$=/^\[object .+?Constructor\]$/,T=/^(?:0|[1-9]\d*)$/,I={};I[i]=I["[object Array]"]=I[g]=I[j]=I[u]=I[c]=I[A]=I[O]=I[w]=I[m]=I[x]=I[s]=I[l]=I[p]=I[y]=I[h]=I[v]=I[b]=I[S]=I[z]=I[E]=I[P]=!0,I["[object Error]"]=I[a]=I[d]=!1;var U="object"==typeof self&&self&&self.Object===Object&&self,B="object"==typeof r&&r&&r.Object===Object&&r||U||Function("return this")(),k=e&&!e.nodeType&&e,M=k&&t&&!t.nodeType&&t,C=M&&M.exports===k;function D(t,r){return t.set(r[0],r[1]),t}function R(t,r){return t.add(r),t}function L(t,r,e,n){var o=-1,i=t?t.length:0;for(n&&i&&(e=t[++o]);++o<i;)e=r(e,t[o],o,t);return e}function N(t){var r=!1;if(null!=t&&"function"!=typeof t.toString)try{r=!!(t+"")}catch(t){}return r}function V(t){var r=-1,e=Array(t.size);return t.forEach((function(t,n){e[++r]=[n,t]})),e}function W(t,r){return function(e){return t(r(e))}}function q(t){var r=-1,e=Array(t.size);return t.forEach((function(t){e[++r]=t})),e}var G,H=Array.prototype,J=Function.prototype,K=Object.prototype,Q=B["__core-js_shared__"],X=(G=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"",Y=J.toString,Z=K.hasOwnProperty,tt=K.toString,rt=RegExp("^"+Y.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),et=C?B.Buffer:void 0,nt=B.Symbol,ot=B.Uint8Array,it=W(Object.getPrototypeOf,Object),ut=Object.create,ct=K.propertyIsEnumerable,at=H.splice,ft=Object.getOwnPropertySymbols,st=et?et.isBuffer:void 0,lt=W(Object.keys,Object),pt=Mt(B,"DataView"),_t=Mt(B,"Map"),yt=Mt(B,"Promise"),ht=Mt(B,"Set"),vt=Mt(B,"WeakMap"),bt=Mt(Object,"create"),dt=Nt(pt),gt=Nt(_t),jt=Nt(yt),At=Nt(ht),Ot=Nt(vt),wt=nt?nt.prototype:void 0,mt=wt?wt.valueOf:void 0;function xt(t){var r=-1,e=t?t.length:0;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}function St(t){var r=-1,e=t?t.length:0;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}function zt(t){var r=-1,e=t?t.length:0;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}function Et(t){this.__data__=new St(t)}function Pt(t,r){var e=Wt(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&qt(t)}(t)&&Z.call(t,"callee")&&(!ct.call(t,"callee")||tt.call(t)==i)}(t)?function(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n}(t.length,String):[],n=e.length,o=!!n;for(var u in t)!r&&!Z.call(t,u)||o&&("length"==u||Rt(u,n))||e.push(u);return e}function Ft(t,r,e){var n=t[r];Z.call(t,r)&&Vt(n,e)&&(void 0!==e||r in t)||(t[r]=e)}function $t(t,r){for(var e=t.length;e--;)if(Vt(t[e][0],r))return e;return-1}function Tt(t,r,e,n,o,_,d){var $;if(n&&($=_?n(t,o,_,d):n(t)),void 0!==$)return $;if(!Jt(t))return t;var T=Wt(t);if(T){if($=function(t){var r=t.length,e=t.constructor(r);r&&"string"==typeof t[0]&&Z.call(t,"index")&&(e.index=t.index,e.input=t.input);return e}(t),!r)return function(t,r){var e=-1,n=t.length;r||(r=Array(n));for(;++e<n;)r[e]=t[e];return r}(t,$)}else{var U=Dt(t),B=U==a||U==f;if(Gt(t))return function(t,r){if(r)return t.slice();var e=new t.constructor(t.length);return t.copy(e),e}(t,r);if(U==p||U==i||B&&!_){if(N(t))return _?t:{};if($=function(t){return"function"!=typeof t.constructor||Lt(t)?{}:(r=it(t),Jt(r)?ut(r):{});var r}(B?{}:t),!r)return function(t,r){return Bt(t,Ct(t),r)}(t,function(t,r){return t&&Bt(r,Kt(r),t)}($,t))}else{if(!I[U])return _?t:{};$=function(t,r,e,n){var o=t.constructor;switch(r){case g:return Ut(t);case u:case c:return new o(+t);case j:return function(t,r){var e=r?Ut(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,n);case A:case O:case w:case m:case x:case S:case z:case E:case P:return function(t,r){var e=r?Ut(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}(t,n);case s:return function(t,r,e){return L(r?e(V(t),!0):V(t),D,new t.constructor)}(t,n,e);case l:case v:return new o(t);case y:return function(t){var r=new t.constructor(t.source,F.exec(t));return r.lastIndex=t.lastIndex,r}(t);case h:return function(t,r,e){return L(r?e(q(t),!0):q(t),R,new t.constructor)}(t,n,e);case b:return i=t,mt?Object(mt.call(i)):{}}var i}(t,U,Tt,r)}}d||(d=new Et);var k=d.get(t);if(k)return k;if(d.set(t,$),!T)var M=e?function(t){return function(t,r,e){var n=r(t);return Wt(t)?n:function(t,r){for(var e=-1,n=r.length,o=t.length;++e<n;)t[o+e]=r[e];return t}(n,e(t))}(t,Kt,Ct)}(t):Kt(t);return function(t,r){for(var e=-1,n=t?t.length:0;++e<n&&!1!==r(t[e],e,t););}(M||t,(function(o,i){M&&(o=t[i=o]),Ft($,i,Tt(o,r,e,n,i,t,d))})),$}function It(t){return!(!Jt(t)||(r=t,X&&X in r))&&(Ht(t)||N(t)?rt:$).test(Nt(t));var r}function Ut(t){var r=new t.constructor(t.byteLength);return new ot(r).set(new ot(t)),r}function Bt(t,r,e,n){e||(e={});for(var o=-1,i=r.length;++o<i;){var u=r[o],c=n?n(e[u],t[u],u,e,t):void 0;Ft(e,u,void 0===c?t[u]:c)}return e}function kt(t,r){var e,n,o=t.__data__;return("string"==(n=typeof(e=r))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==e:null===e)?o["string"==typeof r?"string":"hash"]:o.map}function Mt(t,r){var e=function(t,r){return null==t?void 0:t[r]}(t,r);return It(e)?e:void 0}xt.prototype.clear=function(){this.__data__=bt?bt(null):{}},xt.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},xt.prototype.get=function(t){var r=this.__data__;if(bt){var e=r[t];return e===n?void 0:e}return Z.call(r,t)?r[t]:void 0},xt.prototype.has=function(t){var r=this.__data__;return bt?void 0!==r[t]:Z.call(r,t)},xt.prototype.set=function(t,r){return this.__data__[t]=bt&&void 0===r?n:r,this},St.prototype.clear=function(){this.__data__=[]},St.prototype.delete=function(t){var r=this.__data__,e=$t(r,t);return!(e<0)&&(e==r.length-1?r.pop():at.call(r,e,1),!0)},St.prototype.get=function(t){var r=this.__data__,e=$t(r,t);return e<0?void 0:r[e][1]},St.prototype.has=function(t){return $t(this.__data__,t)>-1},St.prototype.set=function(t,r){var e=this.__data__,n=$t(e,t);return n<0?e.push([t,r]):e[n][1]=r,this},zt.prototype.clear=function(){this.__data__={hash:new xt,map:new(_t||St),string:new xt}},zt.prototype.delete=function(t){return kt(this,t).delete(t)},zt.prototype.get=function(t){return kt(this,t).get(t)},zt.prototype.has=function(t){return kt(this,t).has(t)},zt.prototype.set=function(t,r){return kt(this,t).set(t,r),this},Et.prototype.clear=function(){this.__data__=new St},Et.prototype.delete=function(t){return this.__data__.delete(t)},Et.prototype.get=function(t){return this.__data__.get(t)},Et.prototype.has=function(t){return this.__data__.has(t)},Et.prototype.set=function(t,r){var e=this.__data__;if(e instanceof St){var n=e.__data__;if(!_t||n.length<199)return n.push([t,r]),this;e=this.__data__=new zt(n)}return e.set(t,r),this};var Ct=ft?W(ft,Object):function(){return[]},Dt=function(t){return tt.call(t)};function Rt(t,r){return!!(r=null==r?o:r)&&("number"==typeof t||T.test(t))&&t>-1&&t%1==0&&t<r}function Lt(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||K)}function Nt(t){if(null!=t){try{return Y.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Vt(t,r){return t===r||t!=t&&r!=r}(pt&&Dt(new pt(new ArrayBuffer(1)))!=j||_t&&Dt(new _t)!=s||yt&&Dt(yt.resolve())!=_||ht&&Dt(new ht)!=h||vt&&Dt(new vt)!=d)&&(Dt=function(t){var r=tt.call(t),e=r==p?t.constructor:void 0,n=e?Nt(e):void 0;if(n)switch(n){case dt:return j;case gt:return s;case jt:return _;case At:return h;case Ot:return d}return r});var Wt=Array.isArray;function qt(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}(t.length)&&!Ht(t)}var Gt=st||function(){return!1};function Ht(t){var r=Jt(t)?tt.call(t):"";return r==a||r==f}function Jt(t){var r=typeof t;return!!t&&("object"==r||"function"==r)}function Kt(t){return qt(t)?Pt(t):function(t){if(!Lt(t))return lt(t);var r=[];for(var e in Object(t))Z.call(t,e)&&"constructor"!=e&&r.push(e);return r}(t)}t.exports=function(t){return Tt(t,!0,!0)}}(o,o.exports);var i=o.exports;var u,c,a=Object.prototype,f=Function.prototype.toString,s=a.hasOwnProperty,l=f.call(Object),p=a.toString,_=(u=Object.getPrototypeOf,c=Object,function(t){return u(c(t))});var y=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=p.call(t)||function(t){var r=!1;if(null!=t&&"function"!=typeof t.toString)try{r=!!(t+"")}catch(t){}return r}(t))return!1;var r=_(t);if(null===r)return!0;var e=s.call(r,"constructor")&&r.constructor;return"function"==typeof e&&e instanceof e&&f.call(e)==l};t.flattenAllArrays=function t(r,e){const o={flattenArraysContainingStringsToBeEmpty:!1,...e},u=i(r);let c,a,f;if(Array.isArray(u)){if(o.flattenArraysContainingStringsToBeEmpty&&u.some((t=>"string"==typeof t)))return[];c=null,a={},f=0;for(let t=0,r=u.length;t<r;t++)y(u[t])&&(a=n(a,u[t]),null===c?(c=!0,f=t):(u.splice(t,1),t-=1));null!==c&&(u[f]=i(a))}return y(u)?Object.keys(u).forEach((r=>{(y(u[r])||Array.isArray(u[r]))&&(u[r]=t(u[r],o))})):Array.isArray(u)&&u.forEach(((r,e)=>{(y(u[e])||Array.isArray(u[e]))&&(u[e]=t(u[e],o))})),u},t.version="6.0.1",Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
10
|
+
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self).objectFlattenAllArrays={})}(this,(function(t){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e={exports:{}};!function(t,e){var n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",u="[object Function]",c="[object Object]",a=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s[i]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s[u]=s["[object Map]"]=s["[object Number]"]=s[c]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var l="object"==typeof r&&r&&r.Object===Object&&r,p="object"==typeof self&&self&&self.Object===Object&&self,_=l||p||Function("return this")(),y=e&&!e.nodeType&&e,h=y&&t&&!t.nodeType&&t,v=h&&h.exports===y,b=v&&l.process,d=function(){try{var t=h&&h.require&&h.require("util").types;return t||b&&b.binding&&b.binding("util")}catch(t){}}(),g=d&&d.isTypedArray;function j(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}var A,O,w,m=Array.prototype,x=Object.prototype,S=_["__core-js_shared__"],z=Function.prototype.toString,E=x.hasOwnProperty,P=(A=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",F=x.toString,$=z.call(Object),T=RegExp("^"+z.call(E).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),I=v?_.Buffer:void 0,U=_.Symbol,B=_.Uint8Array,k=I?I.allocUnsafe:void 0,M=(O=Object.getPrototypeOf,w=Object,function(t){return O(w(t))}),C=Object.create,D=x.propertyIsEnumerable,R=m.splice,L=U?U.toStringTag:void 0,N=function(){try{var t=yt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),V=I?I.isBuffer:void 0,W=Math.max,q=Date.now,G=yt(_,"Map"),H=yt(Object,"create"),J=function(){function t(){}return function(r){if(!St(r))return{};if(C)return C(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}}();function K(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}function Q(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}function X(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}function Y(t){var r=this.__data__=new Q(t);this.size=r.size}function Z(t,r){var e=At(t),n=!e&&jt(t),o=!e&&!n&&wt(t),i=!e&&!n&&!o&&Et(t),u=e||n||o||i,c=u?function(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n}(t.length,String):[],a=c.length;for(var f in t)!r&&!E.call(t,f)||u&&("length"==f||o&&("offset"==f||"parent"==f)||i&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||ht(f,a))||c.push(f);return c}function tt(t,r,e){(void 0!==e&&!gt(t[r],e)||void 0===e&&!(r in t))&&nt(t,r,e)}function rt(t,r,e){var n=t[r];E.call(t,r)&>(n,e)&&(void 0!==e||r in t)||nt(t,r,e)}function et(t,r){for(var e=t.length;e--;)if(gt(t[e][0],r))return e;return-1}function nt(t,r,e){"__proto__"==r&&N?N(t,r,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[r]=e}K.prototype.clear=function(){this.__data__=H?H(null):{},this.size=0},K.prototype.delete=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r},K.prototype.get=function(t){var r=this.__data__;if(H){var e=r[t];return e===n?void 0:e}return E.call(r,t)?r[t]:void 0},K.prototype.has=function(t){var r=this.__data__;return H?void 0!==r[t]:E.call(r,t)},K.prototype.set=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=H&&void 0===r?n:r,this},Q.prototype.clear=function(){this.__data__=[],this.size=0},Q.prototype.delete=function(t){var r=this.__data__,e=et(r,t);return!(e<0)&&(e==r.length-1?r.pop():R.call(r,e,1),--this.size,!0)},Q.prototype.get=function(t){var r=this.__data__,e=et(r,t);return e<0?void 0:r[e][1]},Q.prototype.has=function(t){return et(this.__data__,t)>-1},Q.prototype.set=function(t,r){var e=this.__data__,n=et(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this},X.prototype.clear=function(){this.size=0,this.__data__={hash:new K,map:new(G||Q),string:new K}},X.prototype.delete=function(t){var r=_t(this,t).delete(t);return this.size-=r?1:0,r},X.prototype.get=function(t){return _t(this,t).get(t)},X.prototype.has=function(t){return _t(this,t).has(t)},X.prototype.set=function(t,r){var e=_t(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this},Y.prototype.clear=function(){this.__data__=new Q,this.size=0},Y.prototype.delete=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e},Y.prototype.get=function(t){return this.__data__.get(t)},Y.prototype.has=function(t){return this.__data__.has(t)},Y.prototype.set=function(t,r){var e=this.__data__;if(e instanceof Q){var n=e.__data__;if(!G||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new X(n)}return e.set(t,r),this.size=e.size,this};var ot,it=function(t,r,e){for(var n=-1,o=Object(t),i=e(t),u=i.length;u--;){var c=i[ot?u:++n];if(!1===r(o[c],c,o))break}return t};function ut(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":L&&L in Object(t)?function(t){var r=E.call(t,L),e=t[L];try{t[L]=void 0;var n=!0}catch(t){}var o=F.call(t);n&&(r?t[L]=e:delete t[L]);return o}(t):function(t){return F.call(t)}(t)}function ct(t){return zt(t)&&ut(t)==i}function at(t){return!(!St(t)||function(t){return!!P&&P in t}(t))&&(mt(t)?T:a).test(function(t){if(null!=t){try{return z.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function ft(t){if(!St(t))return function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}(t);var r=vt(t),e=[];for(var n in t)("constructor"!=n||!r&&E.call(t,n))&&e.push(n);return e}function st(t,r,e,n,o){t!==r&&it(r,(function(i,u){if(o||(o=new Y),St(i))!function(t,r,e,n,o,i,u){var a=bt(t,e),f=bt(r,e),s=u.get(f);if(s)return void tt(t,e,s);var l=i?i(a,f,e+"",t,r,u):void 0,p=void 0===l;if(p){var _=At(f),y=!_&&wt(f),h=!_&&!y&&Et(f);l=f,_||y||h?At(a)?l=a:zt(j=a)&&Ot(j)?l=function(t,r){var e=-1,n=t.length;r||(r=Array(n));for(;++e<n;)r[e]=t[e];return r}(a):y?(p=!1,l=function(t,r){if(r)return t.slice();var e=t.length,n=k?k(e):new t.constructor(e);return t.copy(n),n}(f,!0)):h?(p=!1,v=f,b=!0?(g=new(d=v.buffer).constructor(d.byteLength),new B(g).set(new B(d)),g):v.buffer,l=new v.constructor(b,v.byteOffset,v.length)):l=[]:function(t){if(!zt(t)||ut(t)!=c)return!1;var r=M(t);if(null===r)return!0;var e=E.call(r,"constructor")&&r.constructor;return"function"==typeof e&&e instanceof e&&z.call(e)==$}(f)||jt(f)?(l=a,jt(a)?l=function(t){return function(t,r,e,n){var o=!e;e||(e={});var i=-1,u=r.length;for(;++i<u;){var c=r[i],a=n?n(e[c],t[c],c,e,t):void 0;void 0===a&&(a=t[c]),o?nt(e,c,a):rt(e,c,a)}return e}(t,Pt(t))}(a):St(a)&&!mt(a)||(l=function(t){return"function"!=typeof t.constructor||vt(t)?{}:J(M(t))}(f))):p=!1}var v,b,d,g;var j;p&&(u.set(f,l),o(l,f,n,i,u),u.delete(f));tt(t,e,l)}(t,r,u,e,st,n,o);else{var a=n?n(bt(t,u),i,u+"",t,r,o):void 0;void 0===a&&(a=i),tt(t,u,a)}}),Pt)}function lt(t,r){return dt(function(t,r,e){return r=W(void 0===r?t.length-1:r,0),function(){for(var n=arguments,o=-1,i=W(n.length-r,0),u=Array(i);++o<i;)u[o]=n[r+o];o=-1;for(var c=Array(r+1);++o<r;)c[o]=n[o];return c[r]=e(u),j(t,this,c)}}(t,r,Tt),t+"")}var pt=N?function(t,r){return N(t,"toString",{configurable:!0,enumerable:!1,value:(e=r,function(){return e}),writable:!0});var e}:Tt;function _t(t,r){var e,n,o=t.__data__;return("string"==(n=typeof(e=r))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==e:null===e)?o["string"==typeof r?"string":"hash"]:o.map}function yt(t,r){var e=function(t,r){return null==t?void 0:t[r]}(t,r);return at(e)?e:void 0}function ht(t,r){var e=typeof t;return!!(r=null==r?o:r)&&("number"==e||"symbol"!=e&&f.test(t))&&t>-1&&t%1==0&&t<r}function vt(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||x)}function bt(t,r){if(("constructor"!==r||"function"!=typeof t[r])&&"__proto__"!=r)return t[r]}var dt=function(t){var r=0,e=0;return function(){var n=q(),o=16-(n-e);if(e=n,o>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}(pt);function gt(t,r){return t===r||t!=t&&r!=r}var jt=ct(function(){return arguments}())?ct:function(t){return zt(t)&&E.call(t,"callee")&&!D.call(t,"callee")},At=Array.isArray;function Ot(t){return null!=t&&xt(t.length)&&!mt(t)}var wt=V||function(){return!1};function mt(t){if(!St(t))return!1;var r=ut(t);return r==u||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}function xt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}function St(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}function zt(t){return null!=t&&"object"==typeof t}var Et=g?function(t){return function(r){return t(r)}}(g):function(t){return zt(t)&&xt(t.length)&&!!s[ut(t)]};function Pt(t){return Ot(t)?Z(t,!0):ft(t)}var Ft,$t=(Ft=function(t,r,e){st(t,r,e)},lt((function(t,r){var e=-1,n=r.length,o=n>1?r[n-1]:void 0,i=n>2?r[2]:void 0;for(o=Ft.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(t,r,e){if(!St(e))return!1;var n=typeof r;return!!("number"==n?Ot(e)&&ht(r,e.length):"string"==n&&r in e)&>(e[r],t)}(r[0],r[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++e<n;){var u=r[e];u&&Ft(t,u,e,o)}return t})));function Tt(t){return t}t.exports=$t}(e,e.exports);var n=e.exports,o={exports:{}};!function(t,e){var n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",u="[object Boolean]",c="[object Date]",a="[object Function]",f="[object GeneratorFunction]",s="[object Map]",l="[object Number]",p="[object Object]",_="[object Promise]",y="[object RegExp]",h="[object Set]",v="[object String]",b="[object Symbol]",d="[object WeakMap]",g="[object ArrayBuffer]",j="[object DataView]",A="[object Float32Array]",O="[object Float64Array]",w="[object Int8Array]",m="[object Int16Array]",x="[object Int32Array]",S="[object Uint8Array]",z="[object Uint8ClampedArray]",E="[object Uint16Array]",P="[object Uint32Array]",F=/\w*$/,$=/^\[object .+?Constructor\]$/,T=/^(?:0|[1-9]\d*)$/,I={};I[i]=I["[object Array]"]=I[g]=I[j]=I[u]=I[c]=I[A]=I[O]=I[w]=I[m]=I[x]=I[s]=I[l]=I[p]=I[y]=I[h]=I[v]=I[b]=I[S]=I[z]=I[E]=I[P]=!0,I["[object Error]"]=I[a]=I[d]=!1;var U="object"==typeof self&&self&&self.Object===Object&&self,B="object"==typeof r&&r&&r.Object===Object&&r||U||Function("return this")(),k=e&&!e.nodeType&&e,M=k&&t&&!t.nodeType&&t,C=M&&M.exports===k;function D(t,r){return t.set(r[0],r[1]),t}function R(t,r){return t.add(r),t}function L(t,r,e,n){var o=-1,i=t?t.length:0;for(n&&i&&(e=t[++o]);++o<i;)e=r(e,t[o],o,t);return e}function N(t){var r=!1;if(null!=t&&"function"!=typeof t.toString)try{r=!!(t+"")}catch(t){}return r}function V(t){var r=-1,e=Array(t.size);return t.forEach((function(t,n){e[++r]=[n,t]})),e}function W(t,r){return function(e){return t(r(e))}}function q(t){var r=-1,e=Array(t.size);return t.forEach((function(t){e[++r]=t})),e}var G,H=Array.prototype,J=Function.prototype,K=Object.prototype,Q=B["__core-js_shared__"],X=(G=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"",Y=J.toString,Z=K.hasOwnProperty,tt=K.toString,rt=RegExp("^"+Y.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),et=C?B.Buffer:void 0,nt=B.Symbol,ot=B.Uint8Array,it=W(Object.getPrototypeOf,Object),ut=Object.create,ct=K.propertyIsEnumerable,at=H.splice,ft=Object.getOwnPropertySymbols,st=et?et.isBuffer:void 0,lt=W(Object.keys,Object),pt=Mt(B,"DataView"),_t=Mt(B,"Map"),yt=Mt(B,"Promise"),ht=Mt(B,"Set"),vt=Mt(B,"WeakMap"),bt=Mt(Object,"create"),dt=Nt(pt),gt=Nt(_t),jt=Nt(yt),At=Nt(ht),Ot=Nt(vt),wt=nt?nt.prototype:void 0,mt=wt?wt.valueOf:void 0;function xt(t){var r=-1,e=t?t.length:0;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}function St(t){var r=-1,e=t?t.length:0;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}function zt(t){var r=-1,e=t?t.length:0;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}function Et(t){this.__data__=new St(t)}function Pt(t,r){var e=Wt(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&qt(t)}(t)&&Z.call(t,"callee")&&(!ct.call(t,"callee")||tt.call(t)==i)}(t)?function(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n}(t.length,String):[],n=e.length,o=!!n;for(var u in t)!r&&!Z.call(t,u)||o&&("length"==u||Rt(u,n))||e.push(u);return e}function Ft(t,r,e){var n=t[r];Z.call(t,r)&&Vt(n,e)&&(void 0!==e||r in t)||(t[r]=e)}function $t(t,r){for(var e=t.length;e--;)if(Vt(t[e][0],r))return e;return-1}function Tt(t,r,e,n,o,_,d){var $;if(n&&($=_?n(t,o,_,d):n(t)),void 0!==$)return $;if(!Jt(t))return t;var T=Wt(t);if(T){if($=function(t){var r=t.length,e=t.constructor(r);r&&"string"==typeof t[0]&&Z.call(t,"index")&&(e.index=t.index,e.input=t.input);return e}(t),!r)return function(t,r){var e=-1,n=t.length;r||(r=Array(n));for(;++e<n;)r[e]=t[e];return r}(t,$)}else{var U=Dt(t),B=U==a||U==f;if(Gt(t))return function(t,r){if(r)return t.slice();var e=new t.constructor(t.length);return t.copy(e),e}(t,r);if(U==p||U==i||B&&!_){if(N(t))return _?t:{};if($=function(t){return"function"!=typeof t.constructor||Lt(t)?{}:(r=it(t),Jt(r)?ut(r):{});var r}(B?{}:t),!r)return function(t,r){return Bt(t,Ct(t),r)}(t,function(t,r){return t&&Bt(r,Kt(r),t)}($,t))}else{if(!I[U])return _?t:{};$=function(t,r,e,n){var o=t.constructor;switch(r){case g:return Ut(t);case u:case c:return new o(+t);case j:return function(t,r){var e=r?Ut(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,n);case A:case O:case w:case m:case x:case S:case z:case E:case P:return function(t,r){var e=r?Ut(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}(t,n);case s:return function(t,r,e){return L(r?e(V(t),!0):V(t),D,new t.constructor)}(t,n,e);case l:case v:return new o(t);case y:return function(t){var r=new t.constructor(t.source,F.exec(t));return r.lastIndex=t.lastIndex,r}(t);case h:return function(t,r,e){return L(r?e(q(t),!0):q(t),R,new t.constructor)}(t,n,e);case b:return i=t,mt?Object(mt.call(i)):{}}var i}(t,U,Tt,r)}}d||(d=new Et);var k=d.get(t);if(k)return k;if(d.set(t,$),!T)var M=e?function(t){return function(t,r,e){var n=r(t);return Wt(t)?n:function(t,r){for(var e=-1,n=r.length,o=t.length;++e<n;)t[o+e]=r[e];return t}(n,e(t))}(t,Kt,Ct)}(t):Kt(t);return function(t,r){for(var e=-1,n=t?t.length:0;++e<n&&!1!==r(t[e],e,t););}(M||t,(function(o,i){M&&(o=t[i=o]),Ft($,i,Tt(o,r,e,n,i,t,d))})),$}function It(t){return!(!Jt(t)||(r=t,X&&X in r))&&(Ht(t)||N(t)?rt:$).test(Nt(t));var r}function Ut(t){var r=new t.constructor(t.byteLength);return new ot(r).set(new ot(t)),r}function Bt(t,r,e,n){e||(e={});for(var o=-1,i=r.length;++o<i;){var u=r[o],c=n?n(e[u],t[u],u,e,t):void 0;Ft(e,u,void 0===c?t[u]:c)}return e}function kt(t,r){var e,n,o=t.__data__;return("string"==(n=typeof(e=r))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==e:null===e)?o["string"==typeof r?"string":"hash"]:o.map}function Mt(t,r){var e=function(t,r){return null==t?void 0:t[r]}(t,r);return It(e)?e:void 0}xt.prototype.clear=function(){this.__data__=bt?bt(null):{}},xt.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},xt.prototype.get=function(t){var r=this.__data__;if(bt){var e=r[t];return e===n?void 0:e}return Z.call(r,t)?r[t]:void 0},xt.prototype.has=function(t){var r=this.__data__;return bt?void 0!==r[t]:Z.call(r,t)},xt.prototype.set=function(t,r){return this.__data__[t]=bt&&void 0===r?n:r,this},St.prototype.clear=function(){this.__data__=[]},St.prototype.delete=function(t){var r=this.__data__,e=$t(r,t);return!(e<0)&&(e==r.length-1?r.pop():at.call(r,e,1),!0)},St.prototype.get=function(t){var r=this.__data__,e=$t(r,t);return e<0?void 0:r[e][1]},St.prototype.has=function(t){return $t(this.__data__,t)>-1},St.prototype.set=function(t,r){var e=this.__data__,n=$t(e,t);return n<0?e.push([t,r]):e[n][1]=r,this},zt.prototype.clear=function(){this.__data__={hash:new xt,map:new(_t||St),string:new xt}},zt.prototype.delete=function(t){return kt(this,t).delete(t)},zt.prototype.get=function(t){return kt(this,t).get(t)},zt.prototype.has=function(t){return kt(this,t).has(t)},zt.prototype.set=function(t,r){return kt(this,t).set(t,r),this},Et.prototype.clear=function(){this.__data__=new St},Et.prototype.delete=function(t){return this.__data__.delete(t)},Et.prototype.get=function(t){return this.__data__.get(t)},Et.prototype.has=function(t){return this.__data__.has(t)},Et.prototype.set=function(t,r){var e=this.__data__;if(e instanceof St){var n=e.__data__;if(!_t||n.length<199)return n.push([t,r]),this;e=this.__data__=new zt(n)}return e.set(t,r),this};var Ct=ft?W(ft,Object):function(){return[]},Dt=function(t){return tt.call(t)};function Rt(t,r){return!!(r=null==r?o:r)&&("number"==typeof t||T.test(t))&&t>-1&&t%1==0&&t<r}function Lt(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||K)}function Nt(t){if(null!=t){try{return Y.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Vt(t,r){return t===r||t!=t&&r!=r}(pt&&Dt(new pt(new ArrayBuffer(1)))!=j||_t&&Dt(new _t)!=s||yt&&Dt(yt.resolve())!=_||ht&&Dt(new ht)!=h||vt&&Dt(new vt)!=d)&&(Dt=function(t){var r=tt.call(t),e=r==p?t.constructor:void 0,n=e?Nt(e):void 0;if(n)switch(n){case dt:return j;case gt:return s;case jt:return _;case At:return h;case Ot:return d}return r});var Wt=Array.isArray;function qt(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}(t.length)&&!Ht(t)}var Gt=st||function(){return!1};function Ht(t){var r=Jt(t)?tt.call(t):"";return r==a||r==f}function Jt(t){var r=typeof t;return!!t&&("object"==r||"function"==r)}function Kt(t){return qt(t)?Pt(t):function(t){if(!Lt(t))return lt(t);var r=[];for(var e in Object(t))Z.call(t,e)&&"constructor"!=e&&r.push(e);return r}(t)}t.exports=function(t){return Tt(t,!0,!0)}}(o,o.exports);var i=o.exports;var u,c,a=Object.prototype,f=Function.prototype.toString,s=a.hasOwnProperty,l=f.call(Object),p=a.toString,_=(u=Object.getPrototypeOf,c=Object,function(t){return u(c(t))});var y=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=p.call(t)||function(t){var r=!1;if(null!=t&&"function"!=typeof t.toString)try{r=!!(t+"")}catch(t){}return r}(t))return!1;var r=_(t);if(null===r)return!0;var e=s.call(r,"constructor")&&r.constructor;return"function"==typeof e&&e instanceof e&&f.call(e)==l};t.flattenAllArrays=function t(r,e){const o={flattenArraysContainingStringsToBeEmpty:!1,...e},u=i(r);let c,a,f;if(Array.isArray(u)){if(o.flattenArraysContainingStringsToBeEmpty&&u.some((t=>"string"==typeof t)))return[];c=null,a={},f=0;for(let t=0,r=u.length;t<r;t++)y(u[t])&&(a=n(a,u[t]),null===c?(c=!0,f=t):(u.splice(t,1),t-=1));null!==c&&(u[f]=i(a))}return y(u)?Object.keys(u).forEach((r=>{(y(u[r])||Array.isArray(u[r]))&&(u[r]=t(u[r],o))})):Array.isArray(u)&&u.forEach(((r,e)=>{(y(u[e])||Array.isArray(u[e]))&&(u[e]=t(u[e],o))})),u},t.version="6.0.2",Object.defineProperty(t,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "object-flatten-all-arrays",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "Merge and flatten any arrays found in all values within plain objects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"arrays",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"core-js": "^3.17.3",
|
|
120
120
|
"cross-env": "^7.0.3",
|
|
121
121
|
"eslint": "^7.32.0",
|
|
122
|
-
"lect": "^0.18.
|
|
122
|
+
"lect": "^0.18.2",
|
|
123
123
|
"rollup": "^2.56.3",
|
|
124
124
|
"rollup-plugin-ascii": "^0.0.3",
|
|
125
125
|
"rollup-plugin-banner": "^0.2.1",
|