object-boolean-combinations 6.0.2 → 6.0.3
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/CHANGELOG.md
CHANGED
|
@@ -3,10 +3,6 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [6.0.2](https://github.com/codsen/codsen/compare/object-boolean-combinations@6.0.1...object-boolean-combinations@6.0.2) (2022-12-06)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package object-boolean-combinations
|
|
9
|
-
|
|
10
6
|
## 6.0.0 (2022-12-01)
|
|
11
7
|
|
|
12
8
|
### BREAKING CHANGES
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name object-boolean-combinations
|
|
3
3
|
* @fileoverview Consumes a defaults object with booleans, generates all possible variations of it
|
|
4
|
-
* @version 6.0.
|
|
4
|
+
* @version 6.0.3
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/object-boolean-combinations/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import g from"lodash.intersection";import O from"lodash.pull";import r
|
|
10
|
+
import g from"lodash.intersection";import O from"lodash.pull";import{isPlainObject as r}from"codsen-utils";import h from"lodash.clonedeep";var j="6.0.3";var D=j;function R(i,c={}){function f(e){let t=[];for(let s=0;s<1<<e;s++){let n=[];for(let d=0;d<e;d++)n.push(s&1<<d?1:0);t.push(n)}return t}if(!i)throw new Error("[THROW_ID_01] missing input object");if(!r(i))throw new Error("[THROW_ID_02] the first input object must be a true object");if(c&&!r(c))throw new Error("[THROW_ID_03] the second override object must be a true object");let m=h(i),o=h(c),l=Object.keys(m),p=[],a=[];r(o)&&Object.keys(o).length&&(a=g(Object.keys(o),Object.keys(m)),a.forEach(e=>O(l,e)));let u=f(Object.keys(l).length),b;return u.forEach((e,t)=>{b={},l.forEach((s,n)=>{b[s]=u[t][n]===1}),p.push(b)}),r(o)&&Object.keys(o).length&&p.forEach(e=>{a.forEach(t=>{e[t]=o[t]})}),p}export{R as combinations,D as version};
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name object-boolean-combinations
|
|
3
3
|
* @fileoverview Consumes a defaults object with booleans, generates all possible variations of it
|
|
4
|
-
* @version 6.0.
|
|
4
|
+
* @version 6.0.3
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/object-boolean-combinations/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";var objectBooleanCombinations=(()=>{var Ce=Object.create;var D=Object.defineProperty;var Se=Object.getOwnPropertyDescriptor;var Ae=Object.getOwnPropertyNames;var Te=Object.getPrototypeOf,Ee=Object.prototype.hasOwnProperty;var R=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ie=(t,e)=>{for(var n in e)D(t,n,{get:e[n],enumerable:!0})},pt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Ae(e))!Ee.call(t,o)&&o!==n&&D(t,o,{get:()=>e[o],enumerable:!(r=Se(e,o))||r.enumerable});return t};var F=(t,e,n)=>(n=t!=null?Ce(Te(t)):{},pt(e||!t||!t.__esModule?D(n,"default",{value:t,enumerable:!0}):n,t)),Me=t=>pt(D({},"__esModule",{value:!0}),t);var Ct=R((Do,xt)=>{var X="__lodash_hash_undefined__",Pe=9007199254740991,He="[object Function]",De="[object GeneratorFunction]",Re=/[\\^$.*+?()[\]{}|]/g,Fe=/^\[object .+?Constructor\]$/,Le=typeof global=="object"&&global&&global.Object===Object&&global,Ge=typeof self=="object"&&self&&self.Object===Object&&self,_t=Le||Ge||Function("return this")();function Ne(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Be(t,e){var n=t?t.length:0;return!!n&&Ke(t,e,0)>-1}function $e(t,e,n){for(var r=-1,o=t?t.length:0;++r<o;)if(n(e,t[r]))return!0;return!1}function yt(t,e){for(var n=-1,r=t?t.length:0,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function Ue(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function Ke(t,e,n){if(e!==e)return Ue(t,We,n);for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}function We(t){return t!==t}function Ve(t){return function(e){return t(e)}}function dt(t,e){return t.has(e)}function ke(t,e){return t==null?void 0:t[e]}function qe(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(n){}return e}var Je=Array.prototype,Xe=Function.prototype,jt=Object.prototype,J=_t["__core-js_shared__"],gt=function(){var t=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),vt=Xe.toString,Y=jt.hasOwnProperty,Ye=jt.toString,Ze=RegExp("^"+vt.call(Y).replace(Re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qe=Je.splice,bt=Math.max,ze=Math.min,tn=mt(_t,"Map"),E=mt(Object,"create");function j(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function en(){this.__data__=E?E(null):{}}function nn(t){return this.has(t)&&delete this.__data__[t]}function rn(t){var e=this.__data__;if(E){var n=e[t];return n===X?void 0:n}return Y.call(e,t)?e[t]:void 0}function on(t){var e=this.__data__;return E?e[t]!==void 0:Y.call(e,t)}function an(t,e){var n=this.__data__;return n[t]=E&&e===void 0?X:e,this}j.prototype.clear=en;j.prototype.delete=nn;j.prototype.get=rn;j.prototype.has=on;j.prototype.set=an;function O(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function cn(){this.__data__=[]}function sn(t){var e=this.__data__,n=G(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Qe.call(e,n,1),!0}function un(t){var e=this.__data__,n=G(e,t);return n<0?void 0:e[n][1]}function ln(t){return G(this.__data__,t)>-1}function fn(t,e){var n=this.__data__,r=G(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}O.prototype.clear=cn;O.prototype.delete=sn;O.prototype.get=un;O.prototype.has=ln;O.prototype.set=fn;function x(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function hn(){this.__data__={hash:new j,map:new(tn||O),string:new j}}function pn(t){return N(this,t).delete(t)}function dn(t){return N(this,t).get(t)}function gn(t){return N(this,t).has(t)}function bn(t,e){return N(this,t).set(t,e),this}x.prototype.clear=hn;x.prototype.delete=pn;x.prototype.get=dn;x.prototype.has=gn;x.prototype.set=bn;function L(t){var e=-1,n=t?t.length:0;for(this.__data__=new x;++e<n;)this.add(t[e])}function _n(t){return this.__data__.set(t,X),this}function yn(t){return this.__data__.has(t)}L.prototype.add=L.prototype.push=_n;L.prototype.has=yn;function G(t,e){for(var n=t.length;n--;)if(An(t[n][0],e))return n;return-1}function jn(t,e,n){for(var r=n?$e:Be,o=t[0].length,i=t.length,a=i,c=Array(i),h=1/0,l=[];a--;){var u=t[a];a&&e&&(u=yt(u,Ve(e))),h=ze(u.length,h),c[a]=!n&&(e||o>=120&&u.length>=120)?new L(a&&u):void 0}u=t[0];var d=-1,g=c[0];t:for(;++d<o&&l.length<h;){var f=u[d],p=e?e(f):f;if(f=n||f!==0?f:0,!(g?dt(g,p):r(l,p,n))){for(a=i;--a;){var ht=c[a];if(!(ht?dt(ht,p):r(t[a],p,n)))continue t}g&&g.push(p),l.push(f)}}return l}function vn(t){if(!Ot(t)||xn(t))return!1;var e=wt(t)||qe(t)?Ze:Fe;return e.test(Cn(t))}function mn(t,e){return e=bt(e===void 0?t.length-1:e,0),function(){for(var n=arguments,r=-1,o=bt(n.length-e,0),i=Array(o);++r<o;)i[r]=n[e+r];r=-1;for(var a=Array(e+1);++r<e;)a[r]=n[r];return a[e]=i,Ne(t,this,a)}}function wn(t){return En(t)?t:[]}function N(t,e){var n=t.__data__;return On(e)?n[typeof e=="string"?"string":"hash"]:n.map}function mt(t,e){var n=ke(t,e);return vn(n)?n:void 0}function On(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function xn(t){return!!gt&> in t}function Cn(t){if(t!=null){try{return vt.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var Sn=mn(function(t){var e=yt(t,wn);return e.length&&e[0]===t[0]?jn(e):[]});function An(t,e){return t===e||t!==t&&e!==e}function Tn(t){return t!=null&&In(t.length)&&!wt(t)}function En(t){return Mn(t)&&Tn(t)}function wt(t){var e=Ot(t)?Ye.call(t):"";return e==He||e==De}function In(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Pe}function Ot(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Mn(t){return!!t&&typeof t=="object"}xt.exports=Sn});var Et=R((Ro,Tt)=>{function Pn(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Hn(t,e){for(var n=-1,r=t?t.length:0,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function Dn(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function Rn(t,e,n){if(e!==e)return Dn(t,Ln,n);for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}function Fn(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function Ln(t){return t!==t}function Gn(t){return function(e){return t(e)}}var Nn=Array.prototype,St=Nn.splice,At=Math.max;function Bn(t,e,n,r){var o=r?Fn:Rn,i=-1,a=e.length,c=t;for(t===e&&(e=Un(e)),n&&(c=Hn(t,Gn(n)));++i<a;)for(var h=0,l=e[i],u=n?n(l):l;(h=o(c,u,h,r))>-1;)c!==t&&St.call(c,h,1),St.call(t,h,1);return t}function $n(t,e){return e=At(e===void 0?t.length-1:e,0),function(){for(var n=arguments,r=-1,o=At(n.length-e,0),i=Array(o);++r<o;)i[r]=n[e+r];r=-1;for(var a=Array(e+1);++r<e;)a[r]=n[r];return a[e]=i,Pn(t,this,a)}}function Un(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Kn=$n(Wn);function Wn(t,e){return t&&t.length&&e&&e.length?Bn(t,e):t}Tt.exports=Kn});var Ht=R((Fo,Pt)=>{var Vn="[object Object]";function kn(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(n){}return e}function qn(t,e){return function(n){return t(e(n))}}var Jn=Function.prototype,It=Object.prototype,Mt=Jn.toString,Xn=It.hasOwnProperty,Yn=Mt.call(Object),Zn=It.toString,Qn=qn(Object.getPrototypeOf,Object);function zn(t){return!!t&&typeof t=="object"}function tr(t){if(!zn(t)||Zn.call(t)!=Vn||kn(t))return!1;var e=Qn(t);if(e===null)return!0;var n=Xn.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Mt.call(n)==Yn}Pt.exports=tr});var me=R((I,C)=>{var er=200,Vt="__lodash_hash_undefined__",kt=9007199254740991,ot="[object Arguments]",nr="[object Array]",qt="[object Boolean]",Jt="[object Date]",rr="[object Error]",it="[object Function]",Xt="[object GeneratorFunction]",B="[object Map]",Yt="[object Number]",at="[object Object]",Dt="[object Promise]",Zt="[object RegExp]",$="[object Set]",Qt="[object String]",zt="[object Symbol]",Q="[object WeakMap]",te="[object ArrayBuffer]",U="[object DataView]",ee="[object Float32Array]",ne="[object Float64Array]",re="[object Int8Array]",oe="[object Int16Array]",ie="[object Int32Array]",ae="[object Uint8Array]",ce="[object Uint8ClampedArray]",se="[object Uint16Array]",ue="[object Uint32Array]",or=/[\\^$.*+?()[\]{}|]/g,ir=/\w*$/,ar=/^\[object .+?Constructor\]$/,cr=/^(?:0|[1-9]\d*)$/,s={};s[ot]=s[nr]=s[te]=s[U]=s[qt]=s[Jt]=s[ee]=s[ne]=s[re]=s[oe]=s[ie]=s[B]=s[Yt]=s[at]=s[Zt]=s[$]=s[Qt]=s[zt]=s[ae]=s[ce]=s[se]=s[ue]=!0;s[rr]=s[it]=s[Q]=!1;var sr=typeof global=="object"&&global&&global.Object===Object&&global,ur=typeof self=="object"&&self&&self.Object===Object&&self,b=sr||ur||Function("return this")(),le=typeof I=="object"&&I&&!I.nodeType&&I,Rt=le&&typeof C=="object"&&C&&!C.nodeType&&C,lr=Rt&&Rt.exports===le;function fr(t,e){return t.set(e[0],e[1]),t}function hr(t,e){return t.add(e),t}function pr(t,e){for(var n=-1,r=t?t.length:0;++n<r&&e(t[n],n,t)!==!1;);return t}function dr(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function fe(t,e,n,r){var o=-1,i=t?t.length:0;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function gr(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function br(t,e){return t==null?void 0:t[e]}function he(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(n){}return e}function Ft(t){var e=-1,n=Array(t.size);return t.forEach(function(r,o){n[++e]=[o,r]}),n}function ct(t,e){return function(n){return t(e(n))}}function Lt(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var _r=Array.prototype,yr=Function.prototype,K=Object.prototype,Z=b["__core-js_shared__"],Gt=function(){var t=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),pe=yr.toString,y=K.hasOwnProperty,W=K.toString,jr=RegExp("^"+pe.call(y).replace(or,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Nt=lr?b.Buffer:void 0,Bt=b.Symbol,$t=b.Uint8Array,vr=ct(Object.getPrototypeOf,Object),mr=Object.create,wr=K.propertyIsEnumerable,Or=_r.splice,Ut=Object.getOwnPropertySymbols,xr=Nt?Nt.isBuffer:void 0,Cr=ct(Object.keys,Object),z=T(b,"DataView"),M=T(b,"Map"),tt=T(b,"Promise"),et=T(b,"Set"),nt=T(b,"WeakMap"),P=T(Object,"create"),Sr=w(z),Ar=w(M),Tr=w(tt),Er=w(et),Ir=w(nt),Kt=Bt?Bt.prototype:void 0,Wt=Kt?Kt.valueOf:void 0;function m(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Mr(){this.__data__=P?P(null):{}}function Pr(t){return this.has(t)&&delete this.__data__[t]}function Hr(t){var e=this.__data__;if(P){var n=e[t];return n===Vt?void 0:n}return y.call(e,t)?e[t]:void 0}function Dr(t){var e=this.__data__;return P?e[t]!==void 0:y.call(e,t)}function Rr(t,e){var n=this.__data__;return n[t]=P&&e===void 0?Vt:e,this}m.prototype.clear=Mr;m.prototype.delete=Pr;m.prototype.get=Hr;m.prototype.has=Dr;m.prototype.set=Rr;function _(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Fr(){this.__data__=[]}function Lr(t){var e=this.__data__,n=V(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Or.call(e,n,1),!0}function Gr(t){var e=this.__data__,n=V(e,t);return n<0?void 0:e[n][1]}function Nr(t){return V(this.__data__,t)>-1}function Br(t,e){var n=this.__data__,r=V(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}_.prototype.clear=Fr;_.prototype.delete=Lr;_.prototype.get=Gr;_.prototype.has=Nr;_.prototype.set=Br;function S(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function $r(){this.__data__={hash:new m,map:new(M||_),string:new m}}function Ur(t){return k(this,t).delete(t)}function Kr(t){return k(this,t).get(t)}function Wr(t){return k(this,t).has(t)}function Vr(t,e){return k(this,t).set(t,e),this}S.prototype.clear=$r;S.prototype.delete=Ur;S.prototype.get=Kr;S.prototype.has=Wr;S.prototype.set=Vr;function A(t){this.__data__=new _(t)}function kr(){this.__data__=new _}function qr(t){return this.__data__.delete(t)}function Jr(t){return this.__data__.get(t)}function Xr(t){return this.__data__.has(t)}function Yr(t,e){var n=this.__data__;if(n instanceof _){var r=n.__data__;if(!M||r.length<er-1)return r.push([t,e]),this;n=this.__data__=new S(r)}return n.set(t,e),this}A.prototype.clear=kr;A.prototype.delete=qr;A.prototype.get=Jr;A.prototype.has=Xr;A.prototype.set=Yr;function Zr(t,e){var n=ut(t)||wo(t)?gr(t.length,String):[],r=n.length,o=!!r;for(var i in t)(e||y.call(t,i))&&!(o&&(i=="length"||yo(i,r)))&&n.push(i);return n}function de(t,e,n){var r=t[e];(!(y.call(t,e)&&ye(r,n))||n===void 0&&!(e in t))&&(t[e]=n)}function V(t,e){for(var n=t.length;n--;)if(ye(t[n][0],e))return n;return-1}function Qr(t,e){return t&&ge(e,lt(e),t)}function rt(t,e,n,r,o,i,a){var c;if(r&&(c=i?r(t,o,i,a):r(t)),c!==void 0)return c;if(!q(t))return t;var h=ut(t);if(h){if(c=go(t),!e)return fo(t,c)}else{var l=v(t),u=l==it||l==Xt;if(xo(t))return oo(t,e);if(l==at||l==ot||u&&!i){if(he(t))return i?t:{};if(c=bo(u?{}:t),!e)return ho(t,Qr(c,t))}else{if(!s[l])return i?t:{};c=_o(t,l,rt,e)}}a||(a=new A);var d=a.get(t);if(d)return d;if(a.set(t,c),!h)var g=n?po(t):lt(t);return pr(g||t,function(f,p){g&&(p=f,f=t[p]),de(c,p,rt(f,e,n,r,p,t,a))}),c}function zr(t){return q(t)?mr(t):{}}function to(t,e,n){var r=e(t);return ut(t)?r:dr(r,n(t))}function eo(t){return W.call(t)}function no(t){if(!q(t)||vo(t))return!1;var e=ve(t)||he(t)?jr:ar;return e.test(w(t))}function ro(t){if(!_e(t))return Cr(t);var e=[];for(var n in Object(t))y.call(t,n)&&n!="constructor"&&e.push(n);return e}function oo(t,e){if(e)return t.slice();var n=new t.constructor(t.length);return t.copy(n),n}function st(t){var e=new t.constructor(t.byteLength);return new $t(e).set(new $t(t)),e}function io(t,e){var n=e?st(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function ao(t,e,n){var r=e?n(Ft(t),!0):Ft(t);return fe(r,fr,new t.constructor)}function co(t){var e=new t.constructor(t.source,ir.exec(t));return e.lastIndex=t.lastIndex,e}function so(t,e,n){var r=e?n(Lt(t),!0):Lt(t);return fe(r,hr,new t.constructor)}function uo(t){return Wt?Object(Wt.call(t)):{}}function lo(t,e){var n=e?st(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function fo(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function ge(t,e,n,r){n||(n={});for(var o=-1,i=e.length;++o<i;){var a=e[o],c=r?r(n[a],t[a],a,n,t):void 0;de(n,a,c===void 0?t[a]:c)}return n}function ho(t,e){return ge(t,be(t),e)}function po(t){return to(t,lt,be)}function k(t,e){var n=t.__data__;return jo(e)?n[typeof e=="string"?"string":"hash"]:n.map}function T(t,e){var n=br(t,e);return no(n)?n:void 0}var be=Ut?ct(Ut,Object):Ao,v=eo;(z&&v(new z(new ArrayBuffer(1)))!=U||M&&v(new M)!=B||tt&&v(tt.resolve())!=Dt||et&&v(new et)!=$||nt&&v(new nt)!=Q)&&(v=function(t){var e=W.call(t),n=e==at?t.constructor:void 0,r=n?w(n):void 0;if(r)switch(r){case Sr:return U;case Ar:return B;case Tr:return Dt;case Er:return $;case Ir:return Q}return e});function go(t){var e=t.length,n=t.constructor(e);return e&&typeof t[0]=="string"&&y.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function bo(t){return typeof t.constructor=="function"&&!_e(t)?zr(vr(t)):{}}function _o(t,e,n,r){var o=t.constructor;switch(e){case te:return st(t);case qt:case Jt:return new o(+t);case U:return io(t,r);case ee:case ne:case re:case oe:case ie:case ae:case ce:case se:case ue:return lo(t,r);case B:return ao(t,r,n);case Yt:case Qt:return new o(t);case Zt:return co(t);case $:return so(t,r,n);case zt:return uo(t)}}function yo(t,e){return e=e==null?kt:e,!!e&&(typeof t=="number"||cr.test(t))&&t>-1&&t%1==0&&t<e}function jo(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function vo(t){return!!Gt&&Gt in t}function _e(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||K;return t===n}function w(t){if(t!=null){try{return pe.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function mo(t){return rt(t,!0,!0)}function ye(t,e){return t===e||t!==t&&e!==e}function wo(t){return Oo(t)&&y.call(t,"callee")&&(!wr.call(t,"callee")||W.call(t)==ot)}var ut=Array.isArray;function je(t){return t!=null&&Co(t.length)&&!ve(t)}function Oo(t){return So(t)&&je(t)}var xo=xr||To;function ve(t){var e=q(t)?W.call(t):"";return e==it||e==Xt}function Co(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=kt}function q(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function So(t){return!!t&&typeof t=="object"}function lt(t){return je(t)?Zr(t):ro(t)}function Ao(){return[]}function To(){return!1}C.exports=mo});var Po={};Ie(Po,{combinations:()=>Mo,version:()=>Io});var Oe=F(Ct(),1),xe=F(Et(),1),H=F(Ht(),1),ft=F(me(),1);var we="6.0.2";var Io=we;function Mo(t,e={}){function n(u){let d=[];for(let g=0;g<1<<u;g++){let f=[];for(let p=0;p<u;p++)f.push(g&1<<p?1:0);d.push(f)}return d}if(!t)throw new Error("[THROW_ID_01] missing input object");if(!(0,H.default)(t))throw new Error("[THROW_ID_02] the first input object must be a true object");if(e&&!(0,H.default)(e))throw new Error("[THROW_ID_03] the second override object must be a true object");let r=(0,ft.default)(t),o=(0,ft.default)(e),i=Object.keys(r),a=[],c=[];(0,H.default)(o)&&Object.keys(o).length&&(c=(0,Oe.default)(Object.keys(o),Object.keys(r)),c.forEach(u=>(0,xe.default)(i,u)));let h=n(Object.keys(i).length),l;return h.forEach((u,d)=>{l={},i.forEach((g,f)=>{l[g]=h[d][f]===1}),a.push(l)}),(0,H.default)(o)&&Object.keys(o).length&&a.forEach(u=>{c.forEach(d=>{u[d]=o[d]})}),a}return Me(Po);})();
|
|
10
|
+
"use strict";var objectBooleanCombinations=(()=>{var we=Object.create;var L=Object.defineProperty;var je=Object.getOwnPropertyDescriptor;var xe=Object.getOwnPropertyNames;var Oe=Object.getPrototypeOf,Ce=Object.prototype.hasOwnProperty;var Q=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ae=(t,e)=>{for(var n in e)L(t,n,{get:e[n],enumerable:!0})},pt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of xe(e))!Ce.call(t,o)&&o!==n&&L(t,o,{get:()=>e[o],enumerable:!(r=je(e,o))||r.enumerable});return t};var V=(t,e,n)=>(n=t!=null?we(Oe(t)):{},pt(e||!t||!t.__esModule?L(n,"default",{value:t,enumerable:!0}):n,t)),Se=t=>pt(L({},"__esModule",{value:!0}),t);var Ct=Q((vo,Ot)=>{var J="__lodash_hash_undefined__",Te=9007199254740991,Ee="[object Function]",Ie="[object GeneratorFunction]",Me=/[\\^$.*+?()[\]{}|]/g,Pe=/^\[object .+?Constructor\]$/,De=typeof global=="object"&&global&&global.Object===Object&&global,Le=typeof self=="object"&&self&&self.Object===Object&&self,_t=De||Le||Function("return this")();function He(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Re(t,e){var n=t?t.length:0;return!!n&&Ge(t,e,0)>-1}function Fe(t,e,n){for(var r=-1,o=t?t.length:0;++r<o;)if(n(e,t[r]))return!0;return!1}function yt(t,e){for(var n=-1,r=t?t.length:0,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function Ne(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function Ge(t,e,n){if(e!==e)return Ne(t,Be,n);for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}function Be(t){return t!==t}function Ue(t){return function(e){return t(e)}}function dt(t,e){return t.has(e)}function $e(t,e){return t==null?void 0:t[e]}function ke(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(n){}return e}var Ke=Array.prototype,We=Function.prototype,mt=Object.prototype,q=_t["__core-js_shared__"],gt=function(){var t=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),vt=We.toString,X=mt.hasOwnProperty,Qe=mt.toString,Ve=RegExp("^"+vt.call(X).replace(Me,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qe=Ke.splice,bt=Math.max,Je=Math.min,Xe=wt(_t,"Map"),E=wt(Object,"create");function m(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ye(){this.__data__=E?E(null):{}}function Ze(t){return this.has(t)&&delete this.__data__[t]}function ze(t){var e=this.__data__;if(E){var n=e[t];return n===J?void 0:n}return X.call(e,t)?e[t]:void 0}function tn(t){var e=this.__data__;return E?e[t]!==void 0:X.call(e,t)}function en(t,e){var n=this.__data__;return n[t]=E&&e===void 0?J:e,this}m.prototype.clear=Ye;m.prototype.delete=Ze;m.prototype.get=ze;m.prototype.has=tn;m.prototype.set=en;function x(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function nn(){this.__data__=[]}function rn(t){var e=this.__data__,n=R(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():qe.call(e,n,1),!0}function on(t){var e=this.__data__,n=R(e,t);return n<0?void 0:e[n][1]}function an(t){return R(this.__data__,t)>-1}function sn(t,e){var n=this.__data__,r=R(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}x.prototype.clear=nn;x.prototype.delete=rn;x.prototype.get=on;x.prototype.has=an;x.prototype.set=sn;function O(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function cn(){this.__data__={hash:new m,map:new(Xe||x),string:new m}}function un(t){return F(this,t).delete(t)}function ln(t){return F(this,t).get(t)}function fn(t){return F(this,t).has(t)}function hn(t,e){return F(this,t).set(t,e),this}O.prototype.clear=cn;O.prototype.delete=un;O.prototype.get=ln;O.prototype.has=fn;O.prototype.set=hn;function H(t){var e=-1,n=t?t.length:0;for(this.__data__=new O;++e<n;)this.add(t[e])}function pn(t){return this.__data__.set(t,J),this}function dn(t){return this.__data__.has(t)}H.prototype.add=H.prototype.push=pn;H.prototype.has=dn;function R(t,e){for(var n=t.length;n--;)if(xn(t[n][0],e))return n;return-1}function gn(t,e,n){for(var r=n?Fe:Re,o=t[0].length,i=t.length,a=i,s=Array(i),h=1/0,l=[];a--;){var u=t[a];a&&e&&(u=yt(u,Ue(e))),h=Je(u.length,h),s[a]=!n&&(e||o>=120&&u.length>=120)?new H(a&&u):void 0}u=t[0];var d=-1,g=s[0];t:for(;++d<o&&l.length<h;){var f=u[d],p=e?e(f):f;if(f=n||f!==0?f:0,!(g?dt(g,p):r(l,p,n))){for(a=i;--a;){var ht=s[a];if(!(ht?dt(ht,p):r(t[a],p,n)))continue t}g&&g.push(p),l.push(f)}}return l}function bn(t){if(!xt(t)||vn(t))return!1;var e=jt(t)||ke(t)?Ve:Pe;return e.test(wn(t))}function _n(t,e){return e=bt(e===void 0?t.length-1:e,0),function(){for(var n=arguments,r=-1,o=bt(n.length-e,0),i=Array(o);++r<o;)i[r]=n[e+r];r=-1;for(var a=Array(e+1);++r<e;)a[r]=n[r];return a[e]=i,He(t,this,a)}}function yn(t){return Cn(t)?t:[]}function F(t,e){var n=t.__data__;return mn(e)?n[typeof e=="string"?"string":"hash"]:n.map}function wt(t,e){var n=$e(t,e);return bn(n)?n:void 0}function mn(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function vn(t){return!!gt&> in t}function wn(t){if(t!=null){try{return vt.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var jn=_n(function(t){var e=yt(t,yn);return e.length&&e[0]===t[0]?gn(e):[]});function xn(t,e){return t===e||t!==t&&e!==e}function On(t){return t!=null&&An(t.length)&&!jt(t)}function Cn(t){return Sn(t)&&On(t)}function jt(t){var e=xt(t)?Qe.call(t):"";return e==Ee||e==Ie}function An(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Te}function xt(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Sn(t){return!!t&&typeof t=="object"}Ot.exports=jn});var Et=Q((wo,Tt)=>{function Tn(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function En(t,e){for(var n=-1,r=t?t.length:0,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function In(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function Mn(t,e,n){if(e!==e)return In(t,Dn,n);for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}function Pn(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function Dn(t){return t!==t}function Ln(t){return function(e){return t(e)}}var Hn=Array.prototype,At=Hn.splice,St=Math.max;function Rn(t,e,n,r){var o=r?Pn:Mn,i=-1,a=e.length,s=t;for(t===e&&(e=Nn(e)),n&&(s=En(t,Ln(n)));++i<a;)for(var h=0,l=e[i],u=n?n(l):l;(h=o(s,u,h,r))>-1;)s!==t&&At.call(s,h,1),At.call(t,h,1);return t}function Fn(t,e){return e=St(e===void 0?t.length-1:e,0),function(){for(var n=arguments,r=-1,o=St(n.length-e,0),i=Array(o);++r<o;)i[r]=n[e+r];r=-1;for(var a=Array(e+1);++r<e;)a[r]=n[r];return a[e]=i,Tn(t,this,a)}}function Nn(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Gn=Fn(Bn);function Bn(t,e){return t&&t.length&&e&&e.length?Rn(t,e):t}Tt.exports=Gn});var _e=Q((M,C)=>{var Un=200,Ut="__lodash_hash_undefined__",$t=9007199254740991,ot="[object Arguments]",$n="[object Array]",kt="[object Boolean]",Kt="[object Date]",kn="[object Error]",it="[object Function]",Wt="[object GeneratorFunction]",N="[object Map]",Qt="[object Number]",at="[object Object]",It="[object Promise]",Vt="[object RegExp]",G="[object Set]",qt="[object String]",Jt="[object Symbol]",Z="[object WeakMap]",Xt="[object ArrayBuffer]",B="[object DataView]",Yt="[object Float32Array]",Zt="[object Float64Array]",zt="[object Int8Array]",te="[object Int16Array]",ee="[object Int32Array]",ne="[object Uint8Array]",re="[object Uint8ClampedArray]",oe="[object Uint16Array]",ie="[object Uint32Array]",Kn=/[\\^$.*+?()[\]{}|]/g,Wn=/\w*$/,Qn=/^\[object .+?Constructor\]$/,Vn=/^(?:0|[1-9]\d*)$/,c={};c[ot]=c[$n]=c[Xt]=c[B]=c[kt]=c[Kt]=c[Yt]=c[Zt]=c[zt]=c[te]=c[ee]=c[N]=c[Qt]=c[at]=c[Vt]=c[G]=c[qt]=c[Jt]=c[ne]=c[re]=c[oe]=c[ie]=!0;c[kn]=c[it]=c[Z]=!1;var qn=typeof global=="object"&&global&&global.Object===Object&&global,Jn=typeof self=="object"&&self&&self.Object===Object&&self,b=qn||Jn||Function("return this")(),ae=typeof M=="object"&&M&&!M.nodeType&&M,Mt=ae&&typeof C=="object"&&C&&!C.nodeType&&C,Xn=Mt&&Mt.exports===ae;function Yn(t,e){return t.set(e[0],e[1]),t}function Zn(t,e){return t.add(e),t}function zn(t,e){for(var n=-1,r=t?t.length:0;++n<r&&e(t[n],n,t)!==!1;);return t}function tr(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function se(t,e,n,r){var o=-1,i=t?t.length:0;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function er(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function nr(t,e){return t==null?void 0:t[e]}function ce(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(n){}return e}function Pt(t){var e=-1,n=Array(t.size);return t.forEach(function(r,o){n[++e]=[o,r]}),n}function st(t,e){return function(n){return t(e(n))}}function Dt(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var rr=Array.prototype,or=Function.prototype,U=Object.prototype,Y=b["__core-js_shared__"],Lt=function(){var t=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ue=or.toString,y=U.hasOwnProperty,$=U.toString,ir=RegExp("^"+ue.call(y).replace(Kn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ht=Xn?b.Buffer:void 0,Rt=b.Symbol,Ft=b.Uint8Array,ar=st(Object.getPrototypeOf,Object),sr=Object.create,cr=U.propertyIsEnumerable,ur=rr.splice,Nt=Object.getOwnPropertySymbols,lr=Ht?Ht.isBuffer:void 0,fr=st(Object.keys,Object),z=T(b,"DataView"),P=T(b,"Map"),tt=T(b,"Promise"),et=T(b,"Set"),nt=T(b,"WeakMap"),D=T(Object,"create"),hr=j(z),pr=j(P),dr=j(tt),gr=j(et),br=j(nt),Gt=Rt?Rt.prototype:void 0,Bt=Gt?Gt.valueOf:void 0;function w(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _r(){this.__data__=D?D(null):{}}function yr(t){return this.has(t)&&delete this.__data__[t]}function mr(t){var e=this.__data__;if(D){var n=e[t];return n===Ut?void 0:n}return y.call(e,t)?e[t]:void 0}function vr(t){var e=this.__data__;return D?e[t]!==void 0:y.call(e,t)}function wr(t,e){var n=this.__data__;return n[t]=D&&e===void 0?Ut:e,this}w.prototype.clear=_r;w.prototype.delete=yr;w.prototype.get=mr;w.prototype.has=vr;w.prototype.set=wr;function _(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function jr(){this.__data__=[]}function xr(t){var e=this.__data__,n=k(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():ur.call(e,n,1),!0}function Or(t){var e=this.__data__,n=k(e,t);return n<0?void 0:e[n][1]}function Cr(t){return k(this.__data__,t)>-1}function Ar(t,e){var n=this.__data__,r=k(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}_.prototype.clear=jr;_.prototype.delete=xr;_.prototype.get=Or;_.prototype.has=Cr;_.prototype.set=Ar;function A(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Sr(){this.__data__={hash:new w,map:new(P||_),string:new w}}function Tr(t){return K(this,t).delete(t)}function Er(t){return K(this,t).get(t)}function Ir(t){return K(this,t).has(t)}function Mr(t,e){return K(this,t).set(t,e),this}A.prototype.clear=Sr;A.prototype.delete=Tr;A.prototype.get=Er;A.prototype.has=Ir;A.prototype.set=Mr;function S(t){this.__data__=new _(t)}function Pr(){this.__data__=new _}function Dr(t){return this.__data__.delete(t)}function Lr(t){return this.__data__.get(t)}function Hr(t){return this.__data__.has(t)}function Rr(t,e){var n=this.__data__;if(n instanceof _){var r=n.__data__;if(!P||r.length<Un-1)return r.push([t,e]),this;n=this.__data__=new A(r)}return n.set(t,e),this}S.prototype.clear=Pr;S.prototype.delete=Dr;S.prototype.get=Lr;S.prototype.has=Hr;S.prototype.set=Rr;function Fr(t,e){var n=ut(t)||so(t)?er(t.length,String):[],r=n.length,o=!!r;for(var i in t)(e||y.call(t,i))&&!(o&&(i=="length"||ro(i,r)))&&n.push(i);return n}function le(t,e,n){var r=t[e];(!(y.call(t,e)&&de(r,n))||n===void 0&&!(e in t))&&(t[e]=n)}function k(t,e){for(var n=t.length;n--;)if(de(t[n][0],e))return n;return-1}function Nr(t,e){return t&&fe(e,lt(e),t)}function rt(t,e,n,r,o,i,a){var s;if(r&&(s=i?r(t,o,i,a):r(t)),s!==void 0)return s;if(!W(t))return t;var h=ut(t);if(h){if(s=to(t),!e)return Yr(t,s)}else{var l=v(t),u=l==it||l==Wt;if(uo(t))return Kr(t,e);if(l==at||l==ot||u&&!i){if(ce(t))return i?t:{};if(s=eo(u?{}:t),!e)return Zr(t,Nr(s,t))}else{if(!c[l])return i?t:{};s=no(t,l,rt,e)}}a||(a=new S);var d=a.get(t);if(d)return d;if(a.set(t,s),!h)var g=n?zr(t):lt(t);return zn(g||t,function(f,p){g&&(p=f,f=t[p]),le(s,p,rt(f,e,n,r,p,t,a))}),s}function Gr(t){return W(t)?sr(t):{}}function Br(t,e,n){var r=e(t);return ut(t)?r:tr(r,n(t))}function Ur(t){return $.call(t)}function $r(t){if(!W(t)||io(t))return!1;var e=be(t)||ce(t)?ir:Qn;return e.test(j(t))}function kr(t){if(!pe(t))return fr(t);var e=[];for(var n in Object(t))y.call(t,n)&&n!="constructor"&&e.push(n);return e}function Kr(t,e){if(e)return t.slice();var n=new t.constructor(t.length);return t.copy(n),n}function ct(t){var e=new t.constructor(t.byteLength);return new Ft(e).set(new Ft(t)),e}function Wr(t,e){var n=e?ct(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function Qr(t,e,n){var r=e?n(Pt(t),!0):Pt(t);return se(r,Yn,new t.constructor)}function Vr(t){var e=new t.constructor(t.source,Wn.exec(t));return e.lastIndex=t.lastIndex,e}function qr(t,e,n){var r=e?n(Dt(t),!0):Dt(t);return se(r,Zn,new t.constructor)}function Jr(t){return Bt?Object(Bt.call(t)):{}}function Xr(t,e){var n=e?ct(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Yr(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function fe(t,e,n,r){n||(n={});for(var o=-1,i=e.length;++o<i;){var a=e[o],s=r?r(n[a],t[a],a,n,t):void 0;le(n,a,s===void 0?t[a]:s)}return n}function Zr(t,e){return fe(t,he(t),e)}function zr(t){return Br(t,lt,he)}function K(t,e){var n=t.__data__;return oo(e)?n[typeof e=="string"?"string":"hash"]:n.map}function T(t,e){var n=nr(t,e);return $r(n)?n:void 0}var he=Nt?st(Nt,Object):ho,v=Ur;(z&&v(new z(new ArrayBuffer(1)))!=B||P&&v(new P)!=N||tt&&v(tt.resolve())!=It||et&&v(new et)!=G||nt&&v(new nt)!=Z)&&(v=function(t){var e=$.call(t),n=e==at?t.constructor:void 0,r=n?j(n):void 0;if(r)switch(r){case hr:return B;case pr:return N;case dr:return It;case gr:return G;case br:return Z}return e});function to(t){var e=t.length,n=t.constructor(e);return e&&typeof t[0]=="string"&&y.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function eo(t){return typeof t.constructor=="function"&&!pe(t)?Gr(ar(t)):{}}function no(t,e,n,r){var o=t.constructor;switch(e){case Xt:return ct(t);case kt:case Kt:return new o(+t);case B:return Wr(t,r);case Yt:case Zt:case zt:case te:case ee:case ne:case re:case oe:case ie:return Xr(t,r);case N:return Qr(t,r,n);case Qt:case qt:return new o(t);case Vt:return Vr(t);case G:return qr(t,r,n);case Jt:return Jr(t)}}function ro(t,e){return e=e==null?$t:e,!!e&&(typeof t=="number"||Vn.test(t))&&t>-1&&t%1==0&&t<e}function oo(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function io(t){return!!Lt&&Lt in t}function pe(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||U;return t===n}function j(t){if(t!=null){try{return ue.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function ao(t){return rt(t,!0,!0)}function de(t,e){return t===e||t!==t&&e!==e}function so(t){return co(t)&&y.call(t,"callee")&&(!cr.call(t,"callee")||$.call(t)==ot)}var ut=Array.isArray;function ge(t){return t!=null&&lo(t.length)&&!be(t)}function co(t){return fo(t)&&ge(t)}var uo=lr||po;function be(t){var e=W(t)?$.call(t):"";return e==it||e==Wt}function lo(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=$t}function W(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function fo(t){return!!t&&typeof t=="object"}function lt(t){return ge(t)?Fr(t):kr(t)}function ho(){return[]}function po(){return!1}C.exports=ao});var yo={};Ae(yo,{combinations:()=>_o,version:()=>bo});var me=V(Ct(),1),ve=V(Et(),1);function I(t){if(t==null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null?!1:!(Symbol.iterator in t)&&!(Symbol.toStringTag in t)}var ft=V(_e(),1);var ye="6.0.3";var bo=ye;function _o(t,e={}){function n(u){let d=[];for(let g=0;g<1<<u;g++){let f=[];for(let p=0;p<u;p++)f.push(g&1<<p?1:0);d.push(f)}return d}if(!t)throw new Error("[THROW_ID_01] missing input object");if(!I(t))throw new Error("[THROW_ID_02] the first input object must be a true object");if(e&&!I(e))throw new Error("[THROW_ID_03] the second override object must be a true object");let r=(0,ft.default)(t),o=(0,ft.default)(e),i=Object.keys(r),a=[],s=[];I(o)&&Object.keys(o).length&&(s=(0,me.default)(Object.keys(o),Object.keys(r)),s.forEach(u=>(0,ve.default)(i,u)));let h=n(Object.keys(i).length),l;return h.forEach((u,d)=>{l={},i.forEach((g,f)=>{l[g]=h[d][f]===1}),a.push(l)}),I(o)&&Object.keys(o).length&&a.forEach(u=>{s.forEach(d=>{u[d]=o[d]})}),a}return Se(yo);})();
|
|
11
|
+
/**
|
|
12
|
+
* @name codsen-utils
|
|
13
|
+
* @fileoverview Various utility functions
|
|
14
|
+
* @version 1.0.1
|
|
15
|
+
* @author Roy Revelt, Codsen Ltd
|
|
16
|
+
* @license MIT
|
|
17
|
+
* {@link https://codsen.com/os/codsen-utils/}
|
|
18
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "object-boolean-combinations",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3",
|
|
4
4
|
"description": "Consumes a defaults object with booleans, generates all possible variations of it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"all",
|
|
@@ -67,15 +67,14 @@
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
+
"codsen-utils": "^1.0.1",
|
|
70
71
|
"lodash.clonedeep": "^4.5.0",
|
|
71
72
|
"lodash.intersection": "^4.4.0",
|
|
72
|
-
"lodash.isplainobject": "^4.0.6",
|
|
73
73
|
"lodash.pull": "^4.1.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@types/lodash.clonedeep": "^4.5.7",
|
|
77
77
|
"@types/lodash.intersection": "^4.4.7",
|
|
78
|
-
"@types/lodash.isplainobject": "^4.0.7",
|
|
79
78
|
"@types/lodash.pull": "^4.1.7"
|
|
80
79
|
}
|
|
81
80
|
}
|
package/types/index.d.ts
CHANGED
|
File without changes
|