object-boolean-combinations 6.0.11 → 6.1.0

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,6 +3,12 @@
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.1.0 (2023-05-13)
7
+
8
+ ### Features
9
+
10
+ - correct the type definitions ([7dd8452](https://github.com/codsen/codsen/commit/7dd8452887634e4ff3175ba489c63a011cc60d37))
11
+
6
12
  ## 6.0.0 (2022-12-01)
7
13
 
8
14
  ### 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.11
4
+ * @version 6.1.0
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{isPlainObject as r}from"codsen-utils";import h from"lodash.clonedeep";var j="6.0.11";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};
10
+ import{pull as g,intersection as O}from"lodash-es";import{isPlainObject as r}from"codsen-utils";import x from"rfdc";var j="6.1.0";var f=x(),T=j;function D(i,c={}){function h(e){let t=[];for(let s=0;s<1<<e;s++){let n=[];for(let m=0;m<e;m++)n.push(s&1<<m?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 plain object");if(c&&!r(c))throw new Error("[THROW_ID_03] the second override object must be a plain object");let u=f(i),o=f(c),l=Object.keys(u),p=[],b=[];r(o)&&Object.keys(o).length&&(b=O(Object.keys(o),Object.keys(u)),b.forEach(e=>g(l,e)));let d=h(Object.keys(l).length),a;return d.forEach((e,t)=>{a={},l.forEach((s,n)=>{a[s]=d[t][n]===1}),p.push(a)}),r(o)&&Object.keys(o).length&&p.forEach(e=>{b.forEach(t=>{e[t]=o[t]})}),p}export{D as combinations,T as version};
@@ -1,18 +1,31 @@
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.11
4
+ * @version 6.1.0
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 ve=Object.create;var B=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)B(t,n,{get:e[n],enumerable:!0})},pt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of xe(e))!Ce.call(t,i)&&i!==n&&B(t,i,{get:()=>e[i],enumerable:!(r=je(e,i))||r.enumerable});return t};var q=(t,e,n)=>(n=t!=null?ve(Oe(t)):{},pt(e||!t||!t.__esModule?B(n,"default",{value:t,enumerable:!0}):n,t)),Se=t=>pt(B({},"__esModule",{value:!0}),t);var Ct=Q((mi,Ot)=>{var J="__lodash_hash_undefined__",Te=9007199254740991,Ee="[object Function]",Ie="[object GeneratorFunction]",Me=/[\\^$.*+?()[\]{}|]/g,De=/^\[object .+?Constructor\]$/,Pe=typeof global=="object"&&global&&global.Object===Object&&global,Be=typeof self=="object"&&self&&self.Object===Object&&self,_t=Pe||Be||Function("return this")();function Le(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 Fe(t,e){var n=t?t.length:0;return!!n&&$e(t,e,0)>-1}function Ne(t,e,n){for(var r=-1,i=t?t.length:0;++r<i;)if(n(e,t[r]))return!0;return!1}function yt(t,e){for(var n=-1,r=t?t.length:0,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Re(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function $e(t,e,n){if(e!==e)return Re(t,He,n);for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function He(t){return t!==t}function Ge(t){return function(e){return t(e)}}function dt(t,e){return t.has(e)}function Ue(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,V=_t["__core-js_shared__"],gt=function(){var t=/[^.]+$/.exec(V&&V.keys&&V.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),wt=We.toString,Z=mt.hasOwnProperty,Qe=mt.toString,qe=RegExp("^"+wt.call(Z).replace(Me,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=Ke.splice,bt=Math.max,Je=Math.min,Ze=vt(_t,"Map"),E=vt(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 Xe(){this.__data__=E?E(null):{}}function Ye(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 Z.call(e,t)?e[t]:void 0}function tn(t){var e=this.__data__;return E?e[t]!==void 0:Z.call(e,t)}function en(t,e){var n=this.__data__;return n[t]=E&&e===void 0?J:e,this}m.prototype.clear=Xe;m.prototype.delete=Ye;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=F(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Ve.call(e,n,1),!0}function on(t){var e=this.__data__,n=F(e,t);return n<0?void 0:e[n][1]}function an(t){return F(this.__data__,t)>-1}function sn(t,e){var n=this.__data__,r=F(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(Ze||x),string:new m}}function un(t){return N(this,t).delete(t)}function ln(t){return N(this,t).get(t)}function fn(t){return N(this,t).has(t)}function hn(t,e){return N(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 L(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)}L.prototype.add=L.prototype.push=pn;L.prototype.has=dn;function F(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?Ne:Fe,i=t[0].length,o=t.length,a=o,s=Array(o),h=1/0,l=[];a--;){var u=t[a];a&&e&&(u=yt(u,Ge(e))),h=Je(u.length,h),s[a]=!n&&(e||i>=120&&u.length>=120)?new L(a&&u):void 0}u=t[0];var d=-1,g=s[0];t:for(;++d<i&&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=o;--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)||wn(t))return!1;var e=jt(t)||ke(t)?qe:De;return e.test(vn(t))}function _n(t,e){return e=bt(e===void 0?t.length-1:e,0),function(){for(var n=arguments,r=-1,i=bt(n.length-e,0),o=Array(i);++r<i;)o[r]=n[e+r];r=-1;for(var a=Array(e+1);++r<e;)a[r]=n[r];return a[e]=o,Le(t,this,a)}}function yn(t){return Cn(t)?t:[]}function N(t,e){var n=t.__data__;return mn(e)?n[typeof e=="string"?"string":"hash"]:n.map}function vt(t,e){var n=Ue(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 wn(t){return!!gt&&gt in t}function vn(t){if(t!=null){try{return wt.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((wi,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,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function In(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Mn(t,e,n){if(e!==e)return In(t,Pn,n);for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Dn(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function Pn(t){return t!==t}function Bn(t){return function(e){return t(e)}}var Ln=Array.prototype,At=Ln.splice,St=Math.max;function Fn(t,e,n,r){var i=r?Dn:Mn,o=-1,a=e.length,s=t;for(t===e&&(e=Rn(e)),n&&(s=En(t,Bn(n)));++o<a;)for(var h=0,l=e[o],u=n?n(l):l;(h=i(s,u,h,r))>-1;)s!==t&&At.call(s,h,1),At.call(t,h,1);return t}function Nn(t,e){return e=St(e===void 0?t.length-1:e,0),function(){for(var n=arguments,r=-1,i=St(n.length-e,0),o=Array(i);++r<i;)o[r]=n[e+r];r=-1;for(var a=Array(e+1);++r<e;)a[r]=n[r];return a[e]=o,Tn(t,this,a)}}function Rn(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var $n=Nn(Hn);function Hn(t,e){return t&&t.length&&e&&e.length?Fn(t,e):t}Tt.exports=$n});var _e=Q((M,C)=>{var Gn=200,Gt="__lodash_hash_undefined__",Ut=9007199254740991,it="[object Arguments]",Un="[object Array]",kt="[object Boolean]",Kt="[object Date]",kn="[object Error]",ot="[object Function]",Wt="[object GeneratorFunction]",R="[object Map]",Qt="[object Number]",at="[object Object]",It="[object Promise]",qt="[object RegExp]",$="[object Set]",Vt="[object String]",Jt="[object Symbol]",Y="[object WeakMap]",Zt="[object ArrayBuffer]",H="[object DataView]",Xt="[object Float32Array]",Yt="[object Float64Array]",zt="[object Int8Array]",te="[object Int16Array]",ee="[object Int32Array]",ne="[object Uint8Array]",re="[object Uint8ClampedArray]",ie="[object Uint16Array]",oe="[object Uint32Array]",Kn=/[\\^$.*+?()[\]{}|]/g,Wn=/\w*$/,Qn=/^\[object .+?Constructor\]$/,qn=/^(?:0|[1-9]\d*)$/,c={};c[it]=c[Un]=c[Zt]=c[H]=c[kt]=c[Kt]=c[Xt]=c[Yt]=c[zt]=c[te]=c[ee]=c[R]=c[Qt]=c[at]=c[qt]=c[$]=c[Vt]=c[Jt]=c[ne]=c[re]=c[ie]=c[oe]=!0;c[kn]=c[ot]=c[Y]=!1;var Vn=typeof global=="object"&&global&&global.Object===Object&&global,Jn=typeof self=="object"&&self&&self.Object===Object&&self,b=Vn||Jn||Function("return this")(),ae=typeof M=="object"&&M&&!M.nodeType&&M,Mt=ae&&typeof C=="object"&&C&&!C.nodeType&&C,Zn=Mt&&Mt.exports===ae;function Xn(t,e){return t.set(e[0],e[1]),t}function Yn(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,i=t.length;++n<r;)t[i+n]=e[n];return t}function se(t,e,n,r){var i=-1,o=t?t.length:0;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,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 Dt(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function st(t,e){return function(n){return t(e(n))}}function Pt(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var rr=Array.prototype,ir=Function.prototype,G=Object.prototype,X=b["__core-js_shared__"],Bt=function(){var t=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ue=ir.toString,y=G.hasOwnProperty,U=G.toString,or=RegExp("^"+ue.call(y).replace(Kn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lt=Zn?b.Buffer:void 0,Ft=b.Symbol,Nt=b.Uint8Array,ar=st(Object.getPrototypeOf,Object),sr=Object.create,cr=G.propertyIsEnumerable,ur=rr.splice,Rt=Object.getOwnPropertySymbols,lr=Lt?Lt.isBuffer:void 0,fr=st(Object.keys,Object),z=T(b,"DataView"),D=T(b,"Map"),tt=T(b,"Promise"),et=T(b,"Set"),nt=T(b,"WeakMap"),P=T(Object,"create"),hr=j(z),pr=j(D),dr=j(tt),gr=j(et),br=j(nt),$t=Ft?Ft.prototype:void 0,Ht=$t?$t.valueOf:void 0;function v(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__=P?P(null):{}}function yr(t){return this.has(t)&&delete this.__data__[t]}function mr(t){var e=this.__data__;if(P){var n=e[t];return n===Gt?void 0:n}return y.call(e,t)?e[t]:void 0}function wr(t){var e=this.__data__;return P?e[t]!==void 0:y.call(e,t)}function vr(t,e){var n=this.__data__;return n[t]=P&&e===void 0?Gt:e,this}v.prototype.clear=_r;v.prototype.delete=yr;v.prototype.get=mr;v.prototype.has=wr;v.prototype.set=vr;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 v,map:new(D||_),string:new v}}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 Dr(){this.__data__=new _}function Pr(t){return this.__data__.delete(t)}function Br(t){return this.__data__.get(t)}function Lr(t){return this.__data__.has(t)}function Fr(t,e){var n=this.__data__;if(n instanceof _){var r=n.__data__;if(!D||r.length<Gn-1)return r.push([t,e]),this;n=this.__data__=new A(r)}return n.set(t,e),this}S.prototype.clear=Dr;S.prototype.delete=Pr;S.prototype.get=Br;S.prototype.has=Lr;S.prototype.set=Fr;function Nr(t,e){var n=ut(t)||si(t)?er(t.length,String):[],r=n.length,i=!!r;for(var o in t)(e||y.call(t,o))&&!(i&&(o=="length"||ri(o,r)))&&n.push(o);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 Rr(t,e){return t&&fe(e,lt(e),t)}function rt(t,e,n,r,i,o,a){var s;if(r&&(s=o?r(t,i,o,a):r(t)),s!==void 0)return s;if(!W(t))return t;var h=ut(t);if(h){if(s=ti(t),!e)return Xr(t,s)}else{var l=w(t),u=l==ot||l==Wt;if(ui(t))return Kr(t,e);if(l==at||l==it||u&&!o){if(ce(t))return o?t:{};if(s=ei(u?{}:t),!e)return Yr(t,Rr(s,t))}else{if(!c[l])return o?t:{};s=ni(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 $r(t){return W(t)?sr(t):{}}function Hr(t,e,n){var r=e(t);return ut(t)?r:tr(r,n(t))}function Gr(t){return U.call(t)}function Ur(t){if(!W(t)||oi(t))return!1;var e=be(t)||ce(t)?or: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 Nt(e).set(new Nt(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(Dt(t),!0):Dt(t);return se(r,Xn,new t.constructor)}function qr(t){var e=new t.constructor(t.source,Wn.exec(t));return e.lastIndex=t.lastIndex,e}function Vr(t,e,n){var r=e?n(Pt(t),!0):Pt(t);return se(r,Yn,new t.constructor)}function Jr(t){return Ht?Object(Ht.call(t)):{}}function Zr(t,e){var n=e?ct(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Xr(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 i=-1,o=e.length;++i<o;){var a=e[i],s=r?r(n[a],t[a],a,n,t):void 0;le(n,a,s===void 0?t[a]:s)}return n}function Yr(t,e){return fe(t,he(t),e)}function zr(t){return Hr(t,lt,he)}function K(t,e){var n=t.__data__;return ii(e)?n[typeof e=="string"?"string":"hash"]:n.map}function T(t,e){var n=nr(t,e);return Ur(n)?n:void 0}var he=Rt?st(Rt,Object):hi,w=Gr;(z&&w(new z(new ArrayBuffer(1)))!=H||D&&w(new D)!=R||tt&&w(tt.resolve())!=It||et&&w(new et)!=$||nt&&w(new nt)!=Y)&&(w=function(t){var e=U.call(t),n=e==at?t.constructor:void 0,r=n?j(n):void 0;if(r)switch(r){case hr:return H;case pr:return R;case dr:return It;case gr:return $;case br:return Y}return e});function ti(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 ei(t){return typeof t.constructor=="function"&&!pe(t)?$r(ar(t)):{}}function ni(t,e,n,r){var i=t.constructor;switch(e){case Zt:return ct(t);case kt:case Kt:return new i(+t);case H:return Wr(t,r);case Xt:case Yt:case zt:case te:case ee:case ne:case re:case ie:case oe:return Zr(t,r);case R:return Qr(t,r,n);case Qt:case Vt:return new i(t);case qt:return qr(t);case $:return Vr(t,r,n);case Jt:return Jr(t)}}function ri(t,e){return e=e==null?Ut:e,!!e&&(typeof t=="number"||qn.test(t))&&t>-1&&t%1==0&&t<e}function ii(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function oi(t){return!!Bt&&Bt in t}function pe(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||G;return t===n}function j(t){if(t!=null){try{return ue.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function ai(t){return rt(t,!0,!0)}function de(t,e){return t===e||t!==t&&e!==e}function si(t){return ci(t)&&y.call(t,"callee")&&(!cr.call(t,"callee")||U.call(t)==it)}var ut=Array.isArray;function ge(t){return t!=null&&li(t.length)&&!be(t)}function ci(t){return fi(t)&&ge(t)}var ui=lr||pi;function be(t){var e=W(t)?U.call(t):"";return e==ot||e==Wt}function li(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Ut}function W(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function fi(t){return!!t&&typeof t=="object"}function lt(t){return ge(t)?Nr(t):kr(t)}function hi(){return[]}function pi(){return!1}C.exports=ai});var _i={};Ae(_i,{combinations:()=>bi,version:()=>gi});var me=q(Ct(),1),we=q(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=q(_e(),1);var ye="6.0.11";var gi=ye;function bi(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),i=(0,ft.default)(e),o=Object.keys(r),a=[],s=[];I(i)&&Object.keys(i).length&&(s=(0,me.default)(Object.keys(i),Object.keys(r)),s.forEach(u=>(0,we.default)(o,u)));let h=n(Object.keys(o).length),l;return h.forEach((u,d)=>{l={},o.forEach((g,f)=>{l[g]=h[d][f]===1}),a.push(l)}),I(i)&&Object.keys(i).length&&a.forEach(u=>{s.forEach(d=>{u[d]=i[d]})}),a}return Se(_i);})();
10
+ "use strict";var objectBooleanCombinations=(()=>{var Xe=Object.create;var D=Object.defineProperty;var Ye=Object.getOwnPropertyDescriptor;var et=Object.getOwnPropertyNames;var tt=Object.getPrototypeOf,rt=Object.prototype.hasOwnProperty;var ot=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),at=(e,t)=>{for(var r in t)D(e,r,{get:t[r],enumerable:!0})},U=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of et(t))!rt.call(e,o)&&o!==r&&D(e,o,{get:()=>t[o],enumerable:!(a=Ye(t,o))||a.enumerable});return e};var ft=(e,t,r)=>(r=e!=null?Xe(tt(e)):{},U(t||!e||!e.__esModule?D(r,"default",{value:e,enumerable:!0}):r,e)),st=e=>U(D({},"__esModule",{value:!0}),e);var Ke=ot((xs,ke)=>{"use strict";ke.exports=to;function _(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function to(e){if(e=e||{},e.circles)return ro(e);return e.proto?a:r;function t(o,i){for(var f=Object.keys(o),s=new Array(f.length),l=0;l<f.length;l++){var n=f[l],p=o[n];typeof p!="object"||p===null?s[n]=p:p instanceof Date?s[n]=new Date(p):ArrayBuffer.isView(p)?s[n]=_(p):s[n]=i(p)}return s}function r(o){if(typeof o!="object"||o===null)return o;if(o instanceof Date)return new Date(o);if(Array.isArray(o))return t(o,r);if(o instanceof Map)return new Map(t(Array.from(o),r));if(o instanceof Set)return new Set(t(Array.from(o),r));var i={};for(var f in o)if(Object.hasOwnProperty.call(o,f)!==!1){var s=o[f];typeof s!="object"||s===null?i[f]=s:s instanceof Date?i[f]=new Date(s):s instanceof Map?i[f]=new Map(t(Array.from(s),r)):s instanceof Set?i[f]=new Set(t(Array.from(s),r)):ArrayBuffer.isView(s)?i[f]=_(s):i[f]=r(s)}return i}function a(o){if(typeof o!="object"||o===null)return o;if(o instanceof Date)return new Date(o);if(Array.isArray(o))return t(o,a);if(o instanceof Map)return new Map(t(Array.from(o),a));if(o instanceof Set)return new Set(t(Array.from(o),a));var i={};for(var f in o){var s=o[f];typeof s!="object"||s===null?i[f]=s:s instanceof Date?i[f]=new Date(s):s instanceof Map?i[f]=new Map(t(Array.from(s),a)):s instanceof Set?i[f]=new Set(t(Array.from(s),a)):ArrayBuffer.isView(s)?i[f]=_(s):i[f]=a(s)}return i}}function ro(e){var t=[],r=[];return e.proto?i:o;function a(f,s){for(var l=Object.keys(f),n=new Array(l.length),p=0;p<l.length;p++){var m=l[p],u=f[m];if(typeof u!="object"||u===null)n[m]=u;else if(u instanceof Date)n[m]=new Date(u);else if(ArrayBuffer.isView(u))n[m]=_(u);else{var d=t.indexOf(u);d!==-1?n[m]=r[d]:n[m]=s(u)}}return n}function o(f){if(typeof f!="object"||f===null)return f;if(f instanceof Date)return new Date(f);if(Array.isArray(f))return a(f,o);if(f instanceof Map)return new Map(a(Array.from(f),o));if(f instanceof Set)return new Set(a(Array.from(f),o));var s={};t.push(f),r.push(s);for(var l in f)if(Object.hasOwnProperty.call(f,l)!==!1){var n=f[l];if(typeof n!="object"||n===null)s[l]=n;else if(n instanceof Date)s[l]=new Date(n);else if(n instanceof Map)s[l]=new Map(a(Array.from(n),o));else if(n instanceof Set)s[l]=new Set(a(Array.from(n),o));else if(ArrayBuffer.isView(n))s[l]=_(n);else{var p=t.indexOf(n);p!==-1?s[l]=r[p]:s[l]=o(n)}}return t.pop(),r.pop(),s}function i(f){if(typeof f!="object"||f===null)return f;if(f instanceof Date)return new Date(f);if(Array.isArray(f))return a(f,i);if(f instanceof Map)return new Map(a(Array.from(f),i));if(f instanceof Set)return new Set(a(Array.from(f),i));var s={};t.push(f),r.push(s);for(var l in f){var n=f[l];if(typeof n!="object"||n===null)s[l]=n;else if(n instanceof Date)s[l]=new Date(n);else if(n instanceof Map)s[l]=new Map(a(Array.from(n),i));else if(n instanceof Set)s[l]=new Set(a(Array.from(n),i));else if(ArrayBuffer.isView(n))s[l]=_(n);else{var p=t.indexOf(n);p!==-1?s[l]=r[p]:s[l]=i(n)}}return t.pop(),r.pop(),s}}});var so={};at(so,{combinations:()=>fo,version:()=>ao});var nt=typeof global=="object"&&global&&global.Object===Object&&global,q=nt;var it=typeof self=="object"&&self&&self.Object===Object&&self,lt=q||it||Function("return this")(),g=lt;var pt=g.Symbol,y=pt;var G=Object.prototype,ut=G.hasOwnProperty,mt=G.toString,S=y?y.toStringTag:void 0;function dt(e){var t=ut.call(e,S),r=e[S];try{e[S]=void 0;var a=!0}catch(i){}var o=mt.call(e);return a&&(t?e[S]=r:delete e[S]),o}var V=dt;var xt=Object.prototype,ct=xt.toString;function ht(e){return ct.call(e)}var k=ht;var bt="[object Null]",gt="[object Undefined]",K=y?y.toStringTag:void 0;function yt(e){return e==null?e===void 0?gt:bt:K&&K in Object(e)?V(e):k(e)}var Q=yt;function vt(e){return e!=null&&typeof e=="object"}var J=vt;function wt(e,t){for(var r=-1,a=e==null?0:e.length,o=Array(a);++r<a;)o[r]=t(e[r],r,e);return o}var v=wt;function jt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var I=jt;function Ot(e){return e}var M=Ot;var At="[object AsyncFunction]",_t="[object Function]",St="[object GeneratorFunction]",Ct="[object Proxy]";function Dt(e){if(!I(e))return!1;var t=Q(e);return t==_t||t==St||t==At||t==Ct}var B=Dt;var It=g["__core-js_shared__"],T=It;var Z=function(){var e=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Mt(e){return!!Z&&Z in e}var X=Mt;var Bt=Function.prototype,Tt=Bt.toString;function Pt(e){if(e!=null){try{return Tt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Y=Pt;var Et=/[\\^$.*+?()[\]{}|]/g,Nt=/^\[object .+?Constructor\]$/,Rt=Function.prototype,Lt=Object.prototype,Wt=Rt.toString,Ft=Lt.hasOwnProperty,Ht=RegExp("^"+Wt.call(Ft).replace(Et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zt(e){if(!I(e)||X(e))return!1;var t=B(e)?Ht:Nt;return t.test(Y(e))}var ee=zt;function $t(e,t){return e==null?void 0:e[t]}var te=$t;function Ut(e,t){var r=te(e,t);return ee(r)?r:void 0}var w=Ut;function qt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var re=qt;function Gt(e,t){var r=-1,a=e.length;for(t||(t=Array(a));++r<a;)t[r]=e[r];return t}var oe=Gt;var Vt=800,kt=16,Kt=Date.now;function Qt(e){var t=0,r=0;return function(){var a=Kt(),o=kt-(a-r);if(r=a,o>0){if(++t>=Vt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var ae=Qt;function Jt(e){return function(){return e}}var fe=Jt;var Zt=function(){try{var e=w(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),L=Zt;var Xt=L?function(e,t){return L(e,"toString",{configurable:!0,enumerable:!1,value:fe(t),writable:!0})}:M,se=Xt;var Yt=ae(se),ne=Yt;function er(e,t,r,a){for(var o=e.length,i=r+(a?1:-1);a?i--:++i<o;)if(t(e[i],i,e))return i;return-1}var ie=er;function tr(e){return e!==e}var le=tr;function rr(e,t,r){for(var a=r-1,o=e.length;++a<o;)if(e[a]===t)return a;return-1}var pe=rr;function or(e,t,r){return t===t?pe(e,t,r):ie(e,le,r)}var P=or;function ar(e,t){var r=e==null?0:e.length;return!!r&&P(e,t,0)>-1}var ue=ar;function fr(e,t){return e===t||e!==e&&t!==t}var me=fr;var de=Math.max;function sr(e,t,r){return t=de(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,i=de(a.length-t,0),f=Array(i);++o<i;)f[o]=a[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=a[o];return s[t]=r(f),re(e,this,s)}}var xe=sr;function nr(e,t){return ne(xe(e,t,M),e+"")}var E=nr;var ir=9007199254740991;function lr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ir}var ce=lr;function pr(e){return e!=null&&ce(e.length)&&!B(e)}var he=pr;function ur(e){return function(t){return e(t)}}var N=ur;var mr=w(Object,"create"),c=mr;function dr(){this.__data__=c?c(null):{},this.size=0}var be=dr;function xr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ge=xr;var cr="__lodash_hash_undefined__",hr=Object.prototype,br=hr.hasOwnProperty;function gr(e){var t=this.__data__;if(c){var r=t[e];return r===cr?void 0:r}return br.call(t,e)?t[e]:void 0}var ye=gr;var yr=Object.prototype,vr=yr.hasOwnProperty;function wr(e){var t=this.__data__;return c?t[e]!==void 0:vr.call(t,e)}var ve=wr;var jr="__lodash_hash_undefined__";function Or(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=c&&t===void 0?jr:t,this}var we=Or;function j(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}j.prototype.clear=be;j.prototype.delete=ge;j.prototype.get=ye;j.prototype.has=ve;j.prototype.set=we;var W=j;function Ar(){this.__data__=[],this.size=0}var je=Ar;function _r(e,t){for(var r=e.length;r--;)if(me(e[r][0],t))return r;return-1}var h=_r;var Sr=Array.prototype,Cr=Sr.splice;function Dr(e){var t=this.__data__,r=h(t,e);if(r<0)return!1;var a=t.length-1;return r==a?t.pop():Cr.call(t,r,1),--this.size,!0}var Oe=Dr;function Ir(e){var t=this.__data__,r=h(t,e);return r<0?void 0:t[r][1]}var Ae=Ir;function Mr(e){return h(this.__data__,e)>-1}var _e=Mr;function Br(e,t){var r=this.__data__,a=h(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this}var Se=Br;function O(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}O.prototype.clear=je;O.prototype.delete=Oe;O.prototype.get=Ae;O.prototype.has=_e;O.prototype.set=Se;var Ce=O;var Tr=w(g,"Map"),De=Tr;function Pr(){this.size=0,this.__data__={hash:new W,map:new(De||Ce),string:new W}}var Ie=Pr;function Er(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Me=Er;function Nr(e,t){var r=e.__data__;return Me(t)?r[typeof t=="string"?"string":"hash"]:r.map}var b=Nr;function Rr(e){var t=b(this,e).delete(e);return this.size-=t?1:0,t}var Be=Rr;function Lr(e){return b(this,e).get(e)}var Te=Lr;function Wr(e){return b(this,e).has(e)}var Pe=Wr;function Fr(e,t){var r=b(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this}var Ee=Fr;function A(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}A.prototype.clear=Ie;A.prototype.delete=Be;A.prototype.get=Te;A.prototype.has=Pe;A.prototype.set=Ee;var Ne=A;var Hr="__lodash_hash_undefined__";function zr(e){return this.__data__.set(e,Hr),this}var Re=zr;function $r(e){return this.__data__.has(e)}var Le=$r;function R(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Ne;++t<r;)this.add(e[t])}R.prototype.add=R.prototype.push=Re;R.prototype.has=Le;var We=R;function Ur(e,t){return e.has(t)}var F=Ur;function qr(e){return J(e)&&he(e)}var Fe=qr;function Gr(e,t,r){for(var a=-1,o=e==null?0:e.length;++a<o;)if(r(t,e[a]))return!0;return!1}var He=Gr;var Vr=Math.min;function kr(e,t,r){for(var a=r?He:ue,o=e[0].length,i=e.length,f=i,s=Array(i),l=1/0,n=[];f--;){var p=e[f];f&&t&&(p=v(p,N(t))),l=Vr(p.length,l),s[f]=!r&&(t||o>=120&&p.length>=120)?new We(f&&p):void 0}p=e[0];var m=-1,u=s[0];e:for(;++m<o&&n.length<l;){var d=p[m],x=t?t(d):d;if(d=r||d!==0?d:0,!(u?F(u,x):a(n,x,r))){for(f=i;--f;){var $=s[f];if(!($?F($,x):a(e[f],x,r)))continue e}u&&u.push(x),n.push(d)}}return n}var ze=kr;function Kr(e){return Fe(e)?e:[]}var $e=Kr;var Qr=E(function(e){var t=v(e,$e);return t.length&&t[0]===e[0]?ze(t):[]}),H=Qr;function Jr(e,t,r,a){for(var o=r-1,i=e.length;++o<i;)if(a(e[o],t))return o;return-1}var Ue=Jr;var Zr=Array.prototype,qe=Zr.splice;function Xr(e,t,r,a){var o=a?Ue:P,i=-1,f=t.length,s=e;for(e===t&&(t=oe(t)),r&&(s=v(e,N(r)));++i<f;)for(var l=0,n=t[i],p=r?r(n):n;(l=o(s,p,l,a))>-1;)s!==e&&qe.call(s,l,1),qe.call(e,l,1);return e}var Ge=Xr;function Yr(e,t){return e&&e.length&&t&&t.length?Ge(e,t):e}var Ve=Yr;var eo=E(Ve),z=eo;function C(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}var Ze=ft(Ke(),1);var Qe="6.1.0";var Je=(0,Ze.default)(),ao=Qe;function fo(e,t={}){function r(p){let m=[];for(let u=0;u<1<<p;u++){let d=[];for(let x=0;x<p;x++)d.push(u&1<<x?1:0);m.push(d)}return m}if(!e)throw new Error("[THROW_ID_01] missing input object");if(!C(e))throw new Error("[THROW_ID_02] the first input object must be a plain object");if(t&&!C(t))throw new Error("[THROW_ID_03] the second override object must be a plain object");let a=Je(e),o=Je(t),i=Object.keys(a),f=[],s=[];C(o)&&Object.keys(o).length&&(s=H(Object.keys(o),Object.keys(a)),s.forEach(p=>z(i,p)));let l=r(Object.keys(i).length),n;return l.forEach((p,m)=>{n={},i.forEach((u,d)=>{n[u]=l[m][d]===1}),f.push(n)}),C(o)&&Object.keys(o).length&&f.forEach(p=>{s.forEach(m=>{p[m]=o[m]})}),f}return st(so);})();
11
11
  /**
12
12
  * @name codsen-utils
13
13
  * @fileoverview Various utility functions
14
- * @version 1.4.0
14
+ * @version 1.5.0
15
15
  * @author Roy Revelt, Codsen Ltd
16
16
  * @license MIT
17
17
  * {@link https://codsen.com/os/codsen-utils/}
18
18
  */
19
+ /*! Bundled license information:
20
+
21
+ lodash-es/lodash.js:
22
+ (**
23
+ * @license
24
+ * Lodash (Custom Build) <https://lodash.com/>
25
+ * Build: `lodash modularize exports="es" -o ./`
26
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
27
+ * Released under MIT license <https://lodash.com/license>
28
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
29
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
30
+ *)
31
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "object-boolean-combinations",
3
- "version": "6.0.11",
3
+ "version": "6.1.0",
4
4
  "description": "Consumes a defaults object with booleans, generates all possible variations of it",
5
5
  "keywords": [
6
6
  "all",
@@ -67,14 +67,9 @@
67
67
  }
68
68
  },
69
69
  "dependencies": {
70
- "codsen-utils": "^1.4.0",
71
- "lodash.clonedeep": "^4.5.0",
72
- "lodash.intersection": "^4.4.0",
73
- "lodash.pull": "^4.1.0"
74
- },
75
- "devDependencies": {
76
- "@types/lodash.clonedeep": "^4.5.7",
77
- "@types/lodash.intersection": "^4.4.7",
78
- "@types/lodash.pull": "^4.1.7"
70
+ "@types/lodash-es": "^4.17.7",
71
+ "codsen-utils": "^1.5.0",
72
+ "lodash-es": "^4.17.21",
73
+ "rfdc": "^1.3.0"
79
74
  }
80
75
  }
package/types/index.d.ts CHANGED
@@ -1,13 +1,9 @@
1
+ import { Obj } from "codsen-utils";
2
+
1
3
  declare const version: string;
2
4
  interface BoolObj {
3
5
  [key: string]: boolean;
4
6
  }
5
- interface Obj {
6
- [key: string]: any;
7
- }
8
- declare function combinations(
9
- input: Obj,
10
- Override?: undefined | Obj
11
- ): BoolObj[];
7
+ declare function combinations(input: Obj, Override?: undefined | Obj): Obj[];
12
8
 
13
- export { BoolObj, Obj, combinations, version };
9
+ export { BoolObj, combinations, version };