test-mixer 3.0.5 → 3.0.11

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2010-2021 Roy Revelt and other contributors
3
+ Copyright (c) 2010-2022 Roy Revelt and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -26,18 +26,17 @@
26
26
 
27
27
  ## Install
28
28
 
29
- This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required:
29
+ The latest version is **ESM only**: Node 12+ is needed to use it and it must be `import`ed instead of `require`d. If your project is not on ESM yet and you want to use `require`, use an older version of this program, `2.1.0`.
30
30
 
31
31
  ```bash
32
32
  npm i test-mixer
33
33
  ```
34
34
 
35
- If you need a legacy version which works with `require`, use version 2.1.0
36
-
37
35
  ## Quick Take
38
36
 
39
37
  ```js
40
38
  import { strict as assert } from "assert";
39
+
41
40
  import { mixer } from "test-mixer";
42
41
 
43
42
  // check all possible combinations of all boolean opts:
@@ -157,7 +156,7 @@ assert.equal(variationsWithScrapeWindshieldOff.length, 4);
157
156
 
158
157
  ## Documentation
159
158
 
160
- Please [visit codsen.com](https://codsen.com/os/test-mixer/) for a full description of the API and examples.
159
+ Please [visit codsen.com](https://codsen.com/os/test-mixer/) for a full description of the API.
161
160
 
162
161
  ## Contributing
163
162
 
@@ -167,6 +166,6 @@ To report bugs or request features or assistance, [raise an issue](https://githu
167
166
 
168
167
  MIT License
169
168
 
170
- Copyright (c) 2010-2021 Roy Revelt and other contributors
169
+ Copyright (c) 2010-2022 Roy Revelt and other contributors
171
170
 
172
171
  <img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center">
@@ -1,50 +1,10 @@
1
1
  /**
2
2
  * @name test-mixer
3
3
  * @fileoverview Test helper to generate function opts object variations
4
- * @version 3.0.5
4
+ * @version 3.0.11
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/test-mixer/}
8
8
  */
9
9
 
10
- import { combinations } from 'object-boolean-combinations';
11
- import clone from 'lodash.clonedeep';
12
-
13
- var version$1 = "3.0.5";
14
-
15
- const version = version$1;
16
- function mixer(ref = {}, defaultsObj = {}) {
17
- if (ref && typeof ref !== "object") {
18
- throw new Error(`test-mixer: [THROW_ID_01] the first input arg is missing!`);
19
- }
20
- if (defaultsObj && typeof defaultsObj !== "object") {
21
- throw new Error(`test-mixer: [THROW_ID_02] the second input arg is missing!`);
22
- }
23
- let caught;
24
- if (typeof ref === "object" && typeof defaultsObj === "object" && Object.keys(ref).some(refKey => {
25
- if (!Object.keys(defaultsObj).includes(refKey)) {
26
- caught = refKey;
27
- return true;
28
- }
29
- })) {
30
- throw new Error(`test-mixer: [THROW_ID_03] the second input arg object should be defaults; it should be a superset of 1st input arg object. However, 1st input arg object contains key "${caught}" which 2nd input arg object doesn't have.`);
31
- }
32
- if (!Object.keys(defaultsObj).length) {
33
- return [];
34
- }
35
- const refClone = clone(ref);
36
- const defaultsObjClone = clone(defaultsObj);
37
- const optsWithBoolValues = {};
38
- Object.keys(defaultsObj).forEach(key => {
39
- if (typeof defaultsObjClone[key] === "boolean" && !Object.keys(ref).includes(key)) {
40
- optsWithBoolValues[key] = defaultsObjClone[key];
41
- }
42
- });
43
- const res = combinations(optsWithBoolValues).map(obj => ({ ...defaultsObj,
44
- ...refClone,
45
- ...obj
46
- }));
47
- return res;
48
- }
49
-
50
- export { mixer, version };
10
+ import{combinations as a}from"object-boolean-combinations";import l from"lodash.clonedeep";var i="3.0.11";var h=i;function g(o={},t={}){if(o&&typeof o!="object")throw new Error("test-mixer: [THROW_ID_01] the first input arg is missing!");if(t&&typeof t!="object")throw new Error("test-mixer: [THROW_ID_02] the second input arg is missing!");let s;if(typeof o=="object"&&typeof t=="object"&&Object.keys(o).some(e=>Object.keys(t).includes(e)?!1:(s=e,!0)))throw new Error(`test-mixer: [THROW_ID_03] the second input arg object should be defaults; it should be a superset of 1st input arg object. However, 1st input arg object contains key "${s}" which 2nd input arg object doesn't have.`);if(!Object.keys(t).length)return[];let c=l(o),n=l(t),r={};return Object.keys(t).forEach(e=>{typeof n[e]=="boolean"&&!Object.keys(o).includes(e)&&(r[e]=n[e])}),a(r).map(e=>({...t,...c,...e}))}export{g as mixer,h as version};
@@ -1,18 +1,18 @@
1
1
  /**
2
2
  * @name test-mixer
3
3
  * @fileoverview Test helper to generate function opts object variations
4
- * @version 3.0.5
4
+ * @version 3.0.11
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/test-mixer/}
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).testMixer={})}(this,(function(t){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e="__lodash_hash_undefined__",n=9007199254740991,o=/^\[object .+?Constructor\]$/,u="object"==typeof self&&self&&self.Object===Object&&self,c="object"==typeof r&&r&&r.Object===Object&&r||u||Function("return this")();function i(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)}function a(t,r){return!!(t?t.length:0)&&function(t,r,e){if(r!=r)return function(t,r,e,n){var o=t.length,u=e+(n?1:-1);for(;n?u--:++u<o;)if(r(t[u],u,t))return u;return-1}(t,l,e);var n=e-1,o=t.length;for(;++n<o;)if(t[n]===r)return n;return-1}(t,r,0)>-1}function f(t,r,e){for(var n=-1,o=t?t.length:0;++n<o;)if(e(r,t[n]))return!0;return!1}function s(t,r){for(var e=-1,n=t?t.length:0,o=Array(n);++e<n;)o[e]=r(t[e],e,t);return o}function l(t){return t!=t}function h(t){return function(r){return t(r)}}function p(t,r){return t.has(r)}var _,y=Array.prototype,v=Function.prototype,b=Object.prototype,d=c["__core-js_shared__"],g=(_=/[^.]+$/.exec(d&&d.keys&&d.keys.IE_PROTO||""))?"Symbol(src)_1."+_:"",j=v.toString,O=b.hasOwnProperty,w=b.toString,m=RegExp("^"+j.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A=y.splice,x=Math.max,E=Math.min,k=W(c,"Map"),S=W(Object,"create");function $(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 I(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 T(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 P(t){var r=-1,e=t?t.length:0;for(this.__data__=new T;++r<e;)this.add(t[r])}function F(t,r){for(var e,n,o=t.length;o--;)if((e=t[o][0])===(n=r)||e!=e&&n!=n)return o;return-1}function R(t){if(!z(t)||(r=t,g&&g in r))return!1;var r,e=C(t)||function(t){var r=!1;if(null!=t&&"function"!=typeof t.toString)try{r=!!(t+"")}catch(t){}return r}(t)?m:o;return e.test(function(t){if(null!=t){try{return j.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function M(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&function(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}(t.length)&&!C(t)}(t)}(t)?t:[]}function D(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 W(t,r){var e=function(t,r){return null==t?void 0:t[r]}(t,r);return R(e)?e:void 0}$.prototype.clear=function(){this.__data__=S?S(null):{}},$.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},$.prototype.get=function(t){var r=this.__data__;if(S){var n=r[t];return n===e?void 0:n}return O.call(r,t)?r[t]:void 0},$.prototype.has=function(t){var r=this.__data__;return S?void 0!==r[t]:O.call(r,t)},$.prototype.set=function(t,r){return this.__data__[t]=S&&void 0===r?e:r,this},I.prototype.clear=function(){this.__data__=[]},I.prototype.delete=function(t){var r=this.__data__,e=F(r,t);return!(e<0)&&(e==r.length-1?r.pop():A.call(r,e,1),!0)},I.prototype.get=function(t){var r=this.__data__,e=F(r,t);return e<0?void 0:r[e][1]},I.prototype.has=function(t){return F(this.__data__,t)>-1},I.prototype.set=function(t,r){var e=this.__data__,n=F(e,t);return n<0?e.push([t,r]):e[n][1]=r,this},T.prototype.clear=function(){this.__data__={hash:new $,map:new(k||I),string:new $}},T.prototype.delete=function(t){return D(this,t).delete(t)},T.prototype.get=function(t){return D(this,t).get(t)},T.prototype.has=function(t){return D(this,t).has(t)},T.prototype.set=function(t,r){return D(this,t).set(t,r),this},P.prototype.add=P.prototype.push=function(t){return this.__data__.set(t,e),this},P.prototype.has=function(t){return this.__data__.has(t)};var H,B,U=(H=function(t){var r=s(t,M);return r.length&&r[0]===t[0]?function(t,r,e){for(var n=e?f:a,o=t[0].length,u=t.length,c=u,i=Array(u),l=1/0,_=[];c--;){var y=t[c];c&&r&&(y=s(y,h(r))),l=E(y.length,l),i[c]=!e&&(r||o>=120&&y.length>=120)?new P(c&&y):void 0}y=t[0];var v=-1,b=i[0];t:for(;++v<o&&_.length<l;){var d=y[v],g=r?r(d):d;if(d=e||0!==d?d:0,!(b?p(b,g):n(_,g,e))){for(c=u;--c;){var j=i[c];if(!(j?p(j,g):n(t[c],g,e)))continue t}b&&b.push(g),_.push(d)}}return _}(r):[]},B=x(void 0===B?H.length-1:B,0),function(){for(var t=arguments,r=-1,e=x(t.length-B,0),n=Array(e);++r<e;)n[r]=t[B+r];r=-1;for(var o=Array(B+1);++r<B;)o[r]=t[r];return o[B]=n,i(H,this,o)});function C(t){var r=z(t)?w.call(t):"";return"[object Function]"==r||"[object GeneratorFunction]"==r}function z(t){var r=typeof t;return!!t&&("object"==r||"function"==r)}var G=U;function L(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)}function V(t,r,e){if(r!=r)return function(t,r,e,n){for(var o=t.length,u=e+(n?1:-1);n?u--:++u<o;)if(r(t[u],u,t))return u;return-1}(t,q,e);for(var n=e-1,o=t.length;++n<o;)if(t[n]===r)return n;return-1}function N(t,r,e,n){for(var o=e-1,u=t.length;++o<u;)if(n(t[o],r))return o;return-1}function q(t){return t!=t}var J=Array.prototype.splice,K=Math.max;function Q(t,r,e,n){var o=n?N:V,u=-1,c=r.length,i=t;for(t===r&&(r=function(t,r){var e=-1,n=t.length;r||(r=Array(n));for(;++e<n;)r[e]=t[e];return r}(r)),e&&(i=function(t,r){for(var e=-1,n=t?t.length:0,o=Array(n);++e<n;)o[e]=r(t[e],e,t);return o}(t,function(t){return function(r){return t(r)}}(e)));++u<c;)for(var a=0,f=r[u],s=e?e(f):f;(a=o(i,s,a,n))>-1;)i!==t&&J.call(i,a,1),J.call(t,a,1);return t}var X=function(t,r){return r=K(void 0===r?t.length-1:r,0),function(){for(var e=arguments,n=-1,o=K(e.length-r,0),u=Array(o);++n<o;)u[n]=e[r+n];n=-1;for(var c=Array(r+1);++n<r;)c[n]=e[n];return c[r]=u,L(t,this,c)}}((function(t,r){return t&&t.length&&r&&r.length?Q(t,r):t}));var Y=X;var Z=Object.prototype,tt=Function.prototype.toString,rt=Z.hasOwnProperty,et=tt.call(Object),nt=Z.toString,ot=function(t,r){return function(e){return t(r(e))}}(Object.getPrototypeOf,Object);var ut=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=nt.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=ot(t);if(null===r)return!0;var e=rt.call(r,"constructor")&&r.constructor;return"function"==typeof e&&e instanceof e&&tt.call(e)==et},ct={exports:{}};!function(t,e){var n="__lodash_hash_undefined__",o=9007199254740991,u="[object Arguments]",c="[object Boolean]",i="[object Date]",a="[object Function]",f="[object GeneratorFunction]",s="[object Map]",l="[object Number]",h="[object Object]",p="[object Promise]",_="[object RegExp]",y="[object Set]",v="[object String]",b="[object Symbol]",d="[object WeakMap]",g="[object ArrayBuffer]",j="[object DataView]",O="[object Float32Array]",w="[object Float64Array]",m="[object Int8Array]",A="[object Int16Array]",x="[object Int32Array]",E="[object Uint8Array]",k="[object Uint8ClampedArray]",S="[object Uint16Array]",$="[object Uint32Array]",I=/\w*$/,T=/^\[object .+?Constructor\]$/,P=/^(?:0|[1-9]\d*)$/,F={};F[u]=F["[object Array]"]=F[g]=F[j]=F[c]=F[i]=F[O]=F[w]=F[m]=F[A]=F[x]=F[s]=F[l]=F[h]=F[_]=F[y]=F[v]=F[b]=F[E]=F[k]=F[S]=F[$]=!0,F["[object Error]"]=F[a]=F[d]=!1;var R="object"==typeof self&&self&&self.Object===Object&&self,M="object"==typeof r&&r&&r.Object===Object&&r||R||Function("return this")(),D=e&&!e.nodeType&&e,W=D&&t&&!t.nodeType&&t,H=W&&W.exports===D;function B(t,r){return t.set(r[0],r[1]),t}function U(t,r){return t.add(r),t}function C(t,r,e,n){var o=-1,u=t?t.length:0;for(n&&u&&(e=t[++o]);++o<u;)e=r(e,t[o],o,t);return e}function z(t){var r=!1;if(null!=t&&"function"!=typeof t.toString)try{r=!!(t+"")}catch(t){}return r}function G(t){var r=-1,e=Array(t.size);return t.forEach((function(t,n){e[++r]=[n,t]})),e}function L(t,r){return function(e){return t(r(e))}}function V(t){var r=-1,e=Array(t.size);return t.forEach((function(t){e[++r]=t})),e}var N=Array.prototype,q=Function.prototype,J=Object.prototype,K=M["__core-js_shared__"],Q=function(){var t=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),X=q.toString,Y=J.hasOwnProperty,Z=J.toString,tt=RegExp("^"+X.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rt=H?M.Buffer:void 0,et=M.Symbol,nt=M.Uint8Array,ot=L(Object.getPrototypeOf,Object),ut=Object.create,ct=J.propertyIsEnumerable,it=N.splice,at=Object.getOwnPropertySymbols,ft=rt?rt.isBuffer:void 0,st=L(Object.keys,Object),lt=Dt(M,"DataView"),ht=Dt(M,"Map"),pt=Dt(M,"Promise"),_t=Dt(M,"Set"),yt=Dt(M,"WeakMap"),vt=Dt(Object,"create"),bt=Ct(lt),dt=Ct(ht),gt=Ct(pt),jt=Ct(_t),Ot=Ct(yt),wt=et?et.prototype:void 0,mt=wt?wt.valueOf:void 0;function At(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 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 Et(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 kt(t){this.__data__=new xt(t)}function St(t,r){var e=Gt(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&Lt(t)}(t)&&Y.call(t,"callee")&&(!ct.call(t,"callee")||Z.call(t)==u)}(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 c in t)!r&&!Y.call(t,c)||o&&("length"==c||Bt(c,n))||e.push(c);return e}function $t(t,r,e){var n=t[r];Y.call(t,r)&&zt(n,e)&&(void 0!==e||r in t)||(t[r]=e)}function It(t,r){for(var e=t.length;e--;)if(zt(t[e][0],r))return e;return-1}function Tt(t,r,e,n,o,p,d){var T;if(n&&(T=p?n(t,o,p,d):n(t)),void 0!==T)return T;if(!qt(t))return t;var P=Gt(t);if(P){if(T=function(t){var r=t.length,e=t.constructor(r);r&&"string"==typeof t[0]&&Y.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,T)}else{var R=Ht(t),M=R==a||R==f;if(Vt(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(R==h||R==u||M&&!p){if(z(t))return p?t:{};if(T=function(t){return"function"!=typeof t.constructor||Ut(t)?{}:(r=ot(t),qt(r)?ut(r):{});var r}(M?{}:t),!r)return function(t,r){return Rt(t,Wt(t),r)}(t,function(t,r){return t&&Rt(r,Jt(r),t)}(T,t))}else{if(!F[R])return p?t:{};T=function(t,r,e,n){var o=t.constructor;switch(r){case g:return Ft(t);case c:case i:return new o(+t);case j:return function(t,r){var e=r?Ft(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,n);case O:case w:case m:case A:case x:case E:case k:case S:case $:return function(t,r){var e=r?Ft(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}(t,n);case s:return function(t,r,e){return C(r?e(G(t),!0):G(t),B,new t.constructor)}(t,n,e);case l:case v:return new o(t);case _:return function(t){var r=new t.constructor(t.source,I.exec(t));return r.lastIndex=t.lastIndex,r}(t);case y:return function(t,r,e){return C(r?e(V(t),!0):V(t),U,new t.constructor)}(t,n,e);case b:return u=t,mt?Object(mt.call(u)):{}}var u}(t,R,Tt,r)}}d||(d=new kt);var D=d.get(t);if(D)return D;if(d.set(t,T),!P)var W=e?function(t){return function(t,r,e){var n=r(t);return Gt(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,Jt,Wt)}(t):Jt(t);return function(t,r){for(var e=-1,n=t?t.length:0;++e<n&&!1!==r(t[e],e,t););}(W||t,(function(o,u){W&&(o=t[u=o]),$t(T,u,Tt(o,r,e,n,u,t,d))})),T}function Pt(t){return!(!qt(t)||function(t){return!!Q&&Q in t}(t))&&(Nt(t)||z(t)?tt:T).test(Ct(t))}function Ft(t){var r=new t.constructor(t.byteLength);return new nt(r).set(new nt(t)),r}function Rt(t,r,e,n){e||(e={});for(var o=-1,u=r.length;++o<u;){var c=r[o],i=n?n(e[c],t[c],c,e,t):void 0;$t(e,c,void 0===i?t[c]:i)}return e}function Mt(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 Dt(t,r){var e=function(t,r){return null==t?void 0:t[r]}(t,r);return Pt(e)?e:void 0}At.prototype.clear=function(){this.__data__=vt?vt(null):{}},At.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},At.prototype.get=function(t){var r=this.__data__;if(vt){var e=r[t];return e===n?void 0:e}return Y.call(r,t)?r[t]:void 0},At.prototype.has=function(t){var r=this.__data__;return vt?void 0!==r[t]:Y.call(r,t)},At.prototype.set=function(t,r){return this.__data__[t]=vt&&void 0===r?n:r,this},xt.prototype.clear=function(){this.__data__=[]},xt.prototype.delete=function(t){var r=this.__data__,e=It(r,t);return!(e<0)&&(e==r.length-1?r.pop():it.call(r,e,1),!0)},xt.prototype.get=function(t){var r=this.__data__,e=It(r,t);return e<0?void 0:r[e][1]},xt.prototype.has=function(t){return It(this.__data__,t)>-1},xt.prototype.set=function(t,r){var e=this.__data__,n=It(e,t);return n<0?e.push([t,r]):e[n][1]=r,this},Et.prototype.clear=function(){this.__data__={hash:new At,map:new(ht||xt),string:new At}},Et.prototype.delete=function(t){return Mt(this,t).delete(t)},Et.prototype.get=function(t){return Mt(this,t).get(t)},Et.prototype.has=function(t){return Mt(this,t).has(t)},Et.prototype.set=function(t,r){return Mt(this,t).set(t,r),this},kt.prototype.clear=function(){this.__data__=new xt},kt.prototype.delete=function(t){return this.__data__.delete(t)},kt.prototype.get=function(t){return this.__data__.get(t)},kt.prototype.has=function(t){return this.__data__.has(t)},kt.prototype.set=function(t,r){var e=this.__data__;if(e instanceof xt){var n=e.__data__;if(!ht||n.length<199)return n.push([t,r]),this;e=this.__data__=new Et(n)}return e.set(t,r),this};var Wt=at?L(at,Object):function(){return[]},Ht=function(t){return Z.call(t)};function Bt(t,r){return!!(r=null==r?o:r)&&("number"==typeof t||P.test(t))&&t>-1&&t%1==0&&t<r}function Ut(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||J)}function Ct(t){if(null!=t){try{return X.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function zt(t,r){return t===r||t!=t&&r!=r}(lt&&Ht(new lt(new ArrayBuffer(1)))!=j||ht&&Ht(new ht)!=s||pt&&Ht(pt.resolve())!=p||_t&&Ht(new _t)!=y||yt&&Ht(new yt)!=d)&&(Ht=function(t){var r=Z.call(t),e=r==h?t.constructor:void 0,n=e?Ct(e):void 0;if(n)switch(n){case bt:return j;case dt:return s;case gt:return p;case jt:return y;case Ot:return d}return r});var Gt=Array.isArray;function Lt(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}(t.length)&&!Nt(t)}var Vt=ft||function(){return!1};function Nt(t){var r=qt(t)?Z.call(t):"";return r==a||r==f}function qt(t){var r=typeof t;return!!t&&("object"==r||"function"==r)}function Jt(t){return Lt(t)?St(t):function(t){if(!Ut(t))return st(t);var r=[];for(var e in Object(t))Y.call(t,e)&&"constructor"!=e&&r.push(e);return r}(t)}t.exports=function(t){return Tt(t,!0,!0)}}(ct,ct.exports);var it=ct.exports;
10
+ var testMixer=(()=>{var $e=Object.create;var E=Object.defineProperty;var Me=Object.getOwnPropertyDescriptor;var De=Object.getOwnPropertyNames,_t=Object.getOwnPropertySymbols,He=Object.getPrototypeOf,bt=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable;var yt=(t,e,n)=>e in t?E(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,R=(t,e)=>{for(var n in e||(e={}))bt.call(e,n)&&yt(t,n,e[n]);if(_t)for(var n of _t(e))Re.call(e,n)&&yt(t,n,e[n]);return t};var jt=t=>E(t,"__esModule",{value:!0});var N=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ne=(t,e)=>{for(var n in e)E(t,n,{get:e[n],enumerable:!0})},vt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of De(e))!bt.call(t,o)&&(n||o!=="default")&&E(t,o,{get:()=>e[o],enumerable:!(r=Me(e,o))||r.enumerable});return t},I=(t,e)=>vt(jt(E(t!=null?$e(He(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),Fe=(t=>(e,n)=>t&&t.get(e)||(n=vt(jt({}),e,1),t&&t.set(e,n),n))(typeof WeakMap!="undefined"?new WeakMap:0);var $t=N((Bo,Pt)=>{var X="__lodash_hash_undefined__",Le=9007199254740991,Ge="[object Function]",Be="[object GeneratorFunction]",Ve=/[\\^$.*+?()[\]{}|]/g,We=/^\[object .+?Constructor\]$/,Ue=typeof global=="object"&&global&&global.Object===Object&&global,Ke=typeof self=="object"&&self&&self.Object===Object&&self,mt=Ue||Ke||Function("return this")();function ke(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 Je(t,e){var n=t?t.length:0;return!!n&&Ye(t,e,0)>-1}function qe(t,e,n){for(var r=-1,o=t?t.length:0;++r<o;)if(n(e,t[r]))return!0;return!1}function wt(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 Xe(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 Ye(t,e,n){if(e!==e)return Xe(t,Ze,n);for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}function Ze(t){return t!==t}function Qe(t){return function(e){return t(e)}}function Ot(t,e){return t.has(e)}function ze(t,e){return t==null?void 0:t[e]}function tn(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(n){}return e}var en=Array.prototype,nn=Function.prototype,xt=Object.prototype,Y=mt["__core-js_shared__"],Ct=function(){var t=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),St=nn.toString,Z=xt.hasOwnProperty,rn=xt.toString,on=RegExp("^"+St.call(Z).replace(Ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),an=en.splice,Tt=Math.max,cn=Math.min,sn=At(mt,"Map"),P=At(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 un(){this.__data__=P?P(null):{}}function ln(t){return this.has(t)&&delete this.__data__[t]}function fn(t){var e=this.__data__;if(P){var n=e[t];return n===X?void 0:n}return Z.call(e,t)?e[t]:void 0}function hn(t){var e=this.__data__;return P?e[t]!==void 0:Z.call(e,t)}function pn(t,e){var n=this.__data__;return n[t]=P&&e===void 0?X:e,this}j.prototype.clear=un;j.prototype.delete=ln;j.prototype.get=fn;j.prototype.has=hn;j.prototype.set=pn;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 dn(){this.__data__=[]}function gn(t){var e=this.__data__,n=L(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():an.call(e,n,1),!0}function _n(t){var e=this.__data__,n=L(e,t);return n<0?void 0:e[n][1]}function bn(t){return L(this.__data__,t)>-1}function yn(t,e){var n=this.__data__,r=L(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}O.prototype.clear=dn;O.prototype.delete=gn;O.prototype.get=_n;O.prototype.has=bn;O.prototype.set=yn;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 jn(){this.__data__={hash:new j,map:new(sn||O),string:new j}}function vn(t){return G(this,t).delete(t)}function mn(t){return G(this,t).get(t)}function wn(t){return G(this,t).has(t)}function On(t,e){return G(this,t).set(t,e),this}x.prototype.clear=jn;x.prototype.delete=vn;x.prototype.get=mn;x.prototype.has=wn;x.prototype.set=On;function F(t){var e=-1,n=t?t.length:0;for(this.__data__=new x;++e<n;)this.add(t[e])}function xn(t){return this.__data__.set(t,X),this}function Cn(t){return this.__data__.has(t)}F.prototype.add=F.prototype.push=xn;F.prototype.has=Cn;function L(t,e){for(var n=t.length;n--;)if(Dn(t[n][0],e))return n;return-1}function Sn(t,e,n){for(var r=n?qe:Je,o=t[0].length,i=t.length,a=i,c=Array(i),h=1/0,l=[];a--;){var u=t[a];a&&e&&(u=wt(u,Qe(e))),h=cn(u.length,h),c[a]=!n&&(e||o>=120&&u.length>=120)?new F(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?Ot(g,p):r(l,p,n))){for(a=i;--a;){var gt=c[a];if(!(gt?Ot(gt,p):r(t[a],p,n)))continue t}g&&g.push(p),l.push(f)}}return l}function Tn(t){if(!It(t)||Pn(t))return!1;var e=Et(t)||tn(t)?on:We;return e.test($n(t))}function An(t,e){return e=Tt(e===void 0?t.length-1:e,0),function(){for(var n=arguments,r=-1,o=Tt(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,ke(t,this,a)}}function En(t){return Rn(t)?t:[]}function G(t,e){var n=t.__data__;return In(e)?n[typeof e=="string"?"string":"hash"]:n.map}function At(t,e){var n=ze(t,e);return Tn(n)?n:void 0}function In(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Pn(t){return!!Ct&&Ct in t}function $n(t){if(t!=null){try{return St.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var Mn=An(function(t){var e=wt(t,En);return e.length&&e[0]===t[0]?Sn(e):[]});function Dn(t,e){return t===e||t!==t&&e!==e}function Hn(t){return t!=null&&Nn(t.length)&&!Et(t)}function Rn(t){return Fn(t)&&Hn(t)}function Et(t){var e=It(t)?rn.call(t):"";return e==Ge||e==Be}function Nn(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Le}function It(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Fn(t){return!!t&&typeof t=="object"}Pt.exports=Mn});var Rt=N((Vo,Ht)=>{function Ln(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 Gn(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 Bn(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 Vn(t,e,n){if(e!==e)return Bn(t,Un,n);for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}function Wn(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function Un(t){return t!==t}function Kn(t){return function(e){return t(e)}}var kn=Array.prototype,Mt=kn.splice,Dt=Math.max;function Jn(t,e,n,r){var o=r?Wn:Vn,i=-1,a=e.length,c=t;for(t===e&&(e=Xn(e)),n&&(c=Gn(t,Kn(n)));++i<a;)for(var h=0,l=e[i],u=n?n(l):l;(h=o(c,u,h,r))>-1;)c!==t&&Mt.call(c,h,1),Mt.call(t,h,1);return t}function qn(t,e){return e=Dt(e===void 0?t.length-1:e,0),function(){for(var n=arguments,r=-1,o=Dt(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,Ln(t,this,a)}}function Xn(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Yn=qn(Zn);function Zn(t,e){return t&&t.length&&e&&e.length?Jn(t,e):t}Ht.exports=Yn});var Gt=N((Wo,Lt)=>{var Qn="[object Object]";function zn(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(n){}return e}function tr(t,e){return function(n){return t(e(n))}}var er=Function.prototype,Nt=Object.prototype,Ft=er.toString,nr=Nt.hasOwnProperty,rr=Ft.call(Object),or=Nt.toString,ir=tr(Object.getPrototypeOf,Object);function ar(t){return!!t&&typeof t=="object"}function cr(t){if(!ar(t)||or.call(t)!=Qn||zn(t))return!1;var e=ir(t);if(e===null)return!0;var n=nr.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Ft.call(n)==rr}Lt.exports=cr});var ht=N((D,A)=>{var sr=200,Bt="__lodash_hash_undefined__",Vt=9007199254740991,Q="[object Arguments]",ur="[object Array]",Wt="[object Boolean]",Ut="[object Date]",lr="[object Error]",z="[object Function]",Kt="[object GeneratorFunction]",B="[object Map]",kt="[object Number]",tt="[object Object]",Jt="[object Promise]",qt="[object RegExp]",V="[object Set]",Xt="[object String]",Yt="[object Symbol]",et="[object WeakMap]",Zt="[object ArrayBuffer]",W="[object DataView]",Qt="[object Float32Array]",zt="[object Float64Array]",te="[object Int8Array]",ee="[object Int16Array]",ne="[object Int32Array]",re="[object Uint8Array]",oe="[object Uint8ClampedArray]",ie="[object Uint16Array]",ae="[object Uint32Array]",fr=/[\\^$.*+?()[\]{}|]/g,hr=/\w*$/,pr=/^\[object .+?Constructor\]$/,dr=/^(?:0|[1-9]\d*)$/,s={};s[Q]=s[ur]=s[Zt]=s[W]=s[Wt]=s[Ut]=s[Qt]=s[zt]=s[te]=s[ee]=s[ne]=s[B]=s[kt]=s[tt]=s[qt]=s[V]=s[Xt]=s[Yt]=s[re]=s[oe]=s[ie]=s[ae]=!0;s[lr]=s[z]=s[et]=!1;var gr=typeof global=="object"&&global&&global.Object===Object&&global,_r=typeof self=="object"&&self&&self.Object===Object&&self,_=gr||_r||Function("return this")(),ce=typeof D=="object"&&D&&!D.nodeType&&D,se=ce&&typeof A=="object"&&A&&!A.nodeType&&A,br=se&&se.exports===ce;function yr(t,e){return t.set(e[0],e[1]),t}function jr(t,e){return t.add(e),t}function vr(t,e){for(var n=-1,r=t?t.length:0;++n<r&&e(t[n],n,t)!==!1;);return t}function mr(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function ue(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 wr(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Or(t,e){return t==null?void 0:t[e]}function le(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(n){}return e}function fe(t){var e=-1,n=Array(t.size);return t.forEach(function(r,o){n[++e]=[o,r]}),n}function nt(t,e){return function(n){return t(e(n))}}function he(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var xr=Array.prototype,Cr=Function.prototype,U=Object.prototype,rt=_["__core-js_shared__"],pe=function(){var t=/[^.]+$/.exec(rt&&rt.keys&&rt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),de=Cr.toString,y=U.hasOwnProperty,K=U.toString,Sr=RegExp("^"+de.call(y).replace(fr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ge=br?_.Buffer:void 0,_e=_.Symbol,be=_.Uint8Array,Tr=nt(Object.getPrototypeOf,Object),Ar=Object.create,Er=U.propertyIsEnumerable,Ir=xr.splice,ye=Object.getOwnPropertySymbols,Pr=ge?ge.isBuffer:void 0,$r=nt(Object.keys,Object),ot=T(_,"DataView"),$=T(_,"Map"),it=T(_,"Promise"),at=T(_,"Set"),ct=T(_,"WeakMap"),M=T(Object,"create"),Mr=w(ot),Dr=w($),Hr=w(it),Rr=w(at),Nr=w(ct),je=_e?_e.prototype:void 0,ve=je?je.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 Fr(){this.__data__=M?M(null):{}}function Lr(t){return this.has(t)&&delete this.__data__[t]}function Gr(t){var e=this.__data__;if(M){var n=e[t];return n===Bt?void 0:n}return y.call(e,t)?e[t]:void 0}function Br(t){var e=this.__data__;return M?e[t]!==void 0:y.call(e,t)}function Vr(t,e){var n=this.__data__;return n[t]=M&&e===void 0?Bt:e,this}v.prototype.clear=Fr;v.prototype.delete=Lr;v.prototype.get=Gr;v.prototype.has=Br;v.prototype.set=Vr;function b(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 Wr(){this.__data__=[]}function Ur(t){var e=this.__data__,n=k(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Ir.call(e,n,1),!0}function Kr(t){var e=this.__data__,n=k(e,t);return n<0?void 0:e[n][1]}function kr(t){return k(this.__data__,t)>-1}function Jr(t,e){var n=this.__data__,r=k(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}b.prototype.clear=Wr;b.prototype.delete=Ur;b.prototype.get=Kr;b.prototype.has=kr;b.prototype.set=Jr;function C(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 qr(){this.__data__={hash:new v,map:new($||b),string:new v}}function Xr(t){return J(this,t).delete(t)}function Yr(t){return J(this,t).get(t)}function Zr(t){return J(this,t).has(t)}function Qr(t,e){return J(this,t).set(t,e),this}C.prototype.clear=qr;C.prototype.delete=Xr;C.prototype.get=Yr;C.prototype.has=Zr;C.prototype.set=Qr;function S(t){this.__data__=new b(t)}function zr(){this.__data__=new b}function to(t){return this.__data__.delete(t)}function eo(t){return this.__data__.get(t)}function no(t){return this.__data__.has(t)}function ro(t,e){var n=this.__data__;if(n instanceof b){var r=n.__data__;if(!$||r.length<sr-1)return r.push([t,e]),this;n=this.__data__=new C(r)}return n.set(t,e),this}S.prototype.clear=zr;S.prototype.delete=to;S.prototype.get=eo;S.prototype.has=no;S.prototype.set=ro;function oo(t,e){var n=lt(t)||Eo(t)?wr(t.length,String):[],r=n.length,o=!!r;for(var i in t)(e||y.call(t,i))&&!(o&&(i=="length"||Co(i,r)))&&n.push(i);return n}function me(t,e,n){var r=t[e];(!(y.call(t,e)&&Ce(r,n))||n===void 0&&!(e in t))&&(t[e]=n)}function k(t,e){for(var n=t.length;n--;)if(Ce(t[n][0],e))return n;return-1}function io(t,e){return t&&we(e,ft(e),t)}function st(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=lt(t);if(h){if(c=wo(t),!e)return jo(t,c)}else{var l=m(t),u=l==z||l==Kt;if(Po(t))return fo(t,e);if(l==tt||l==Q||u&&!i){if(le(t))return i?t:{};if(c=Oo(u?{}:t),!e)return vo(t,io(c,t))}else{if(!s[l])return i?t:{};c=xo(t,l,st,e)}}a||(a=new S);var d=a.get(t);if(d)return d;if(a.set(t,c),!h)var g=n?mo(t):ft(t);return vr(g||t,function(f,p){g&&(p=f,f=t[p]),me(c,p,st(f,e,n,r,p,t,a))}),c}function ao(t){return q(t)?Ar(t):{}}function co(t,e,n){var r=e(t);return lt(t)?r:mr(r,n(t))}function so(t){return K.call(t)}function uo(t){if(!q(t)||To(t))return!1;var e=Te(t)||le(t)?Sr:pr;return e.test(w(t))}function lo(t){if(!xe(t))return $r(t);var e=[];for(var n in Object(t))y.call(t,n)&&n!="constructor"&&e.push(n);return e}function fo(t,e){if(e)return t.slice();var n=new t.constructor(t.length);return t.copy(n),n}function ut(t){var e=new t.constructor(t.byteLength);return new be(e).set(new be(t)),e}function ho(t,e){var n=e?ut(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function po(t,e,n){var r=e?n(fe(t),!0):fe(t);return ue(r,yr,new t.constructor)}function go(t){var e=new t.constructor(t.source,hr.exec(t));return e.lastIndex=t.lastIndex,e}function _o(t,e,n){var r=e?n(he(t),!0):he(t);return ue(r,jr,new t.constructor)}function bo(t){return ve?Object(ve.call(t)):{}}function yo(t,e){var n=e?ut(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function jo(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function we(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;me(n,a,c===void 0?t[a]:c)}return n}function vo(t,e){return we(t,Oe(t),e)}function mo(t){return co(t,ft,Oe)}function J(t,e){var n=t.__data__;return So(e)?n[typeof e=="string"?"string":"hash"]:n.map}function T(t,e){var n=Or(t,e);return uo(n)?n:void 0}var Oe=ye?nt(ye,Object):Do,m=so;(ot&&m(new ot(new ArrayBuffer(1)))!=W||$&&m(new $)!=B||it&&m(it.resolve())!=Jt||at&&m(new at)!=V||ct&&m(new ct)!=et)&&(m=function(t){var e=K.call(t),n=e==tt?t.constructor:void 0,r=n?w(n):void 0;if(r)switch(r){case Mr:return W;case Dr:return B;case Hr:return Jt;case Rr:return V;case Nr:return et}return e});function wo(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 Oo(t){return typeof t.constructor=="function"&&!xe(t)?ao(Tr(t)):{}}function xo(t,e,n,r){var o=t.constructor;switch(e){case Zt:return ut(t);case Wt:case Ut:return new o(+t);case W:return ho(t,r);case Qt:case zt:case te:case ee:case ne:case re:case oe:case ie:case ae:return yo(t,r);case B:return po(t,r,n);case kt:case Xt:return new o(t);case qt:return go(t);case V:return _o(t,r,n);case Yt:return bo(t)}}function Co(t,e){return e=e==null?Vt:e,!!e&&(typeof t=="number"||dr.test(t))&&t>-1&&t%1==0&&t<e}function So(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function To(t){return!!pe&&pe in t}function xe(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||U;return t===n}function w(t){if(t!=null){try{return de.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Ao(t){return st(t,!0,!0)}function Ce(t,e){return t===e||t!==t&&e!==e}function Eo(t){return Io(t)&&y.call(t,"callee")&&(!Er.call(t,"callee")||K.call(t)==Q)}var lt=Array.isArray;function Se(t){return t!=null&&$o(t.length)&&!Te(t)}function Io(t){return Mo(t)&&Se(t)}var Po=Pr||Ho;function Te(t){var e=q(t)?K.call(t):"";return e==z||e==Kt}function $o(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Vt}function q(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Mo(t){return!!t&&typeof t=="object"}function ft(t){return Se(t)?oo(t):lo(t)}function Do(){return[]}function Ho(){return!1}A.exports=Ao});var Lo={};Ne(Lo,{mixer:()=>Fo,version:()=>No});var Ae=I($t(),1),Ee=I(Rt(),1),H=I(Gt(),1),pt=I(ht(),1);function Ie(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,pt.default)(t),o=(0,pt.default)(e),i=Object.keys(r),a=[],c=[];(0,H.default)(o)&&Object.keys(o).length&&(c=(0,Ae.default)(Object.keys(o),Object.keys(r)),c.forEach(u=>(0,Ee.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}var dt=I(ht(),1);var Pe="3.0.11";var No=Pe;function Fo(t={},e={}){if(t&&typeof t!="object")throw new Error("test-mixer: [THROW_ID_01] the first input arg is missing!");if(e&&typeof e!="object")throw new Error("test-mixer: [THROW_ID_02] the second input arg is missing!");let n;if(typeof t=="object"&&typeof e=="object"&&Object.keys(t).some(c=>Object.keys(e).includes(c)?!1:(n=c,!0)))throw new Error(`test-mixer: [THROW_ID_03] the second input arg object should be defaults; it should be a superset of 1st input arg object. However, 1st input arg object contains key "${n}" which 2nd input arg object doesn't have.`);if(!Object.keys(e).length)return[];let r=(0,dt.default)(t),o=(0,dt.default)(e),i={};return Object.keys(e).forEach(c=>{typeof o[c]=="boolean"&&!Object.keys(t).includes(c)&&(i[c]=o[c])}),Ie(i).map(c=>R(R(R({},e),r),c))}return Fe(Lo);})();
11
11
  /**
12
12
  * @name object-boolean-combinations
13
13
  * @fileoverview Consumes a defaults object with booleans, generates all possible variations of it
14
- * @version 5.0.5
14
+ * @version 5.0.11
15
15
  * @author Roy Revelt, Codsen Ltd
16
16
  * @license MIT
17
17
  * {@link https://codsen.com/os/object-boolean-combinations/}
18
- */t.mixer=function(t={},r={}){if(t&&"object"!=typeof t)throw new Error("test-mixer: [THROW_ID_01] the first input arg is missing!");if(r&&"object"!=typeof r)throw new Error("test-mixer: [THROW_ID_02] the second input arg is missing!");let e;if("object"==typeof t&&"object"==typeof r&&Object.keys(t).some((t=>{if(!Object.keys(r).includes(t))return e=t,!0})))throw new Error(`test-mixer: [THROW_ID_03] the second input arg object should be defaults; it should be a superset of 1st input arg object. However, 1st input arg object contains key "${e}" which 2nd input arg object doesn't have.`);if(!Object.keys(r).length)return[];const n=it(t),o=it(r),u={};return Object.keys(r).forEach((r=>{"boolean"!=typeof o[r]||Object.keys(t).includes(r)||(u[r]=o[r])})),function(t,r={}){if(!t)throw new Error("[THROW_ID_01] missing input object");if(!ut(t))throw new Error("[THROW_ID_02] the first input object must be a true object");if(r&&!ut(r))throw new Error("[THROW_ID_03] the second override object must be a true object");const e=it(t),n=it(r),o=Object.keys(e),u=[];let c=[];ut(n)&&Object.keys(n).length&&(c=G(Object.keys(n),Object.keys(e)),c.forEach((t=>Y(o,t))));const i=function(t){const r=[];for(let e=0;e<1<<t;e++){const n=[];for(let r=0;r<t;r++)n.push(e&1<<r?1:0);r.push(n)}return r}(Object.keys(o).length);let a;return i.forEach(((t,r)=>{a={},o.forEach(((t,e)=>{a[t]=1===i[r][e]})),u.push(a)})),ut(n)&&Object.keys(n).length&&u.forEach((t=>c.forEach((r=>{t[r]=n[r]})))),u}(u).map((t=>({...r,...n,...t})))},t.version="3.0.5",Object.defineProperty(t,"__esModule",{value:!0})}));
18
+ */
@@ -1,6 +1,7 @@
1
1
  // Quick Take
2
2
 
3
3
  import { strict as assert } from "assert";
4
+
4
5
  import { mixer } from "../dist/test-mixer.esm.js";
5
6
 
6
7
  // check all possible combinations of all boolean opts:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-mixer",
3
- "version": "3.0.5",
3
+ "version": "3.0.11",
4
4
  "description": "Test helper to generate function opts object variations",
5
5
  "keywords": [
6
6
  "combinations",
@@ -31,98 +31,43 @@
31
31
  },
32
32
  "types": "types/index.d.ts",
33
33
  "scripts": {
34
- "build": "rollup -c",
35
- "ci_test": "npm run build && npm run format && tap --no-only --reporter=silent --output-file=testStats.md && npm run clean_cov",
36
- "clean_cov": "../../scripts/leaveCoverageTotalOnly.js",
37
- "clean_types": "../../scripts/cleanTypes.js",
38
- "dev": "rollup -c --dev",
39
- "devunittest": "npm run dev && tap --only -R 'base'",
40
- "esbuild": "node '../../scripts/esbuild.js'",
41
- "esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
42
- "format": "npm run lect && npm run prettier && npm run lint",
43
- "lect": "lect",
44
- "lint": "../../node_modules/eslint/bin/eslint.js . --ext .js --ext .ts --fix --config \"../../.eslintrc.json\" --quiet",
45
- "perf": "node perf/check",
46
- "prettier": "../../node_modules/prettier/bin-prettier.js '*.{js,css,scss,vue,md,ts}' --write --loglevel silent",
47
- "republish": "npm publish || :",
48
- "tap": "tap",
49
- "pretest": "npm run build",
50
- "test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format",
51
- "test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
52
- "tsc": "tsc",
53
- "unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf"
34
+ "build": "node '../../ops/scripts/esbuild.js' && yarn run dts",
35
+ "dev": "DEV=true node '../../ops/scripts/esbuild.js' && yarn run dts",
36
+ "dts": "rollup -c && yarn run prettier 'types/index.d.ts' --write",
37
+ "examples": "node '../../ops/scripts/run-examples.js'",
38
+ "lect": "node '../../ops/lect/lect.js'",
39
+ "letspublish": "yarn publish || :",
40
+ "lint": "eslint . --fix",
41
+ "perf": "node perf/check.js",
42
+ "prepare": "echo 'ready'",
43
+ "prettier": "prettier",
44
+ "prettier:format": "prettier --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern",
45
+ "pretest": "yarn run lect && yarn run build",
46
+ "test": "c8 yarn run unit && yarn run examples && yarn run lint",
47
+ "unit": "uvu test"
54
48
  },
55
- "tap": {
56
- "check-coverage": false,
57
- "coverage-report": [
58
- "json-summary",
59
- "text"
60
- ],
61
- "node-arg": [
62
- "--no-warnings",
63
- "--experimental-loader",
64
- "@istanbuljs/esm-loader-hook"
49
+ "engines": {
50
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
51
+ },
52
+ "c8": {
53
+ "check-coverage": true,
54
+ "exclude": [
55
+ "**/test/**/*.*"
65
56
  ],
66
- "timeout": 0
57
+ "lines": 100
67
58
  },
68
59
  "lect": {
69
60
  "licence": {
70
61
  "extras": [
71
62
  ""
72
63
  ]
73
- },
74
- "req": "{ mixer }",
75
- "various": {
76
- "devDependencies": [
77
- "@types/lodash.clonedeep"
78
- ]
79
64
  }
80
65
  },
81
66
  "dependencies": {
82
- "@babel/runtime": "^7.16.0",
83
67
  "lodash.clonedeep": "^4.5.0",
84
- "object-boolean-combinations": "^5.0.5"
68
+ "object-boolean-combinations": "^5.0.11"
85
69
  },
86
70
  "devDependencies": {
87
- "@babel/cli": "^7.16.0",
88
- "@babel/core": "^7.16.0",
89
- "@babel/node": "^7.16.0",
90
- "@babel/plugin-external-helpers": "^7.16.0",
91
- "@babel/plugin-proposal-class-properties": "^7.16.0",
92
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
93
- "@babel/plugin-proposal-object-rest-spread": "^7.16.0",
94
- "@babel/plugin-proposal-optional-chaining": "^7.16.0",
95
- "@babel/plugin-transform-runtime": "^7.16.0",
96
- "@babel/preset-env": "^7.16.0",
97
- "@babel/preset-typescript": "^7.16.0",
98
- "@babel/register": "^7.16.0",
99
- "@istanbuljs/esm-loader-hook": "^0.1.2",
100
- "@rollup/plugin-babel": "^5.3.0",
101
- "@rollup/plugin-commonjs": "^21.0.1",
102
- "@rollup/plugin-json": "^4.1.0",
103
- "@rollup/plugin-node-resolve": "^13.0.6",
104
- "@rollup/plugin-strip": "^2.1.0",
105
- "@rollup/plugin-typescript": "^8.3.0",
106
- "@types/lodash.clonedeep": "^4.5.6",
107
- "@types/node": "^16.11.6",
108
- "@types/tap": "^15.0.5",
109
- "@typescript-eslint/eslint-plugin": "^5.3.0",
110
- "@typescript-eslint/parser": "^5.3.0",
111
- "core-js": "^3.19.1",
112
- "cross-env": "^7.0.3",
113
- "eslint": "^8.2.0",
114
- "lect": "^0.18.5",
115
- "rollup": "^2.59.0",
116
- "rollup-plugin-ascii": "^0.0.3",
117
- "rollup-plugin-banner": "^0.2.1",
118
- "rollup-plugin-cleanup": "^3.2.1",
119
- "rollup-plugin-dts": "^4.0.1",
120
- "rollup-plugin-terser": "^7.0.2",
121
- "tap": "^15.0.10",
122
- "tslib": "^2.3.1",
123
- "typescript": "^4.4.4"
124
- },
125
- "engines": {
126
- "node": ">=12"
71
+ "@types/lodash.clonedeep": "^4.5.6"
127
72
  }
128
73
  }
package/types/index.d.ts CHANGED
@@ -1,10 +1,13 @@
1
1
  declare const version: string;
2
2
  declare type PlainObject = {
3
- [name: string]: any;
3
+ [name: string]: any;
4
4
  };
5
5
  declare type PlainObjectOfBool = {
6
- [name: string]: boolean;
6
+ [name: string]: boolean;
7
7
  };
8
- declare function mixer(ref?: PlainObject, defaultsObj?: PlainObject): PlainObjectOfBool[];
8
+ declare function mixer(
9
+ ref?: PlainObject,
10
+ defaultsObj?: PlainObject
11
+ ): PlainObjectOfBool[];
9
12
 
10
13
  export { mixer, version };
package/examples/api.json DELETED
@@ -1 +0,0 @@
1
- {"_quickTake.js":{"title":"Quick Take","content":"import &#x7B; strict as assert &#x7D; from \"assert\";\nimport &#x7B; mixer &#x7D; from \"test-mixer\";\n\n// check all possible combinations of all boolean opts:\nconst defaultOpts = &#x7B;\n scrapeWindshield: true,\n checkOil: true,\n inflateTires: false,\n extinguishersCount: 1, // as non-boolean will be ignored\n&#x7D;;\n\n// generates 2^3 = 8 combinations all possible bools\nassert.deepEqual(\n mixer(\n &#x7B;\n // empty first arg object means you want all combinations\n &#x7D;,\n defaultOpts\n ),\n [\n &#x7B;\n scrapeWindshield: false,\n checkOil: false,\n inflateTires: false,\n extinguishersCount: 1,\n &#x7D;,\n &#x7B;\n scrapeWindshield: true,\n checkOil: false,\n inflateTires: false,\n extinguishersCount: 1,\n &#x7D;,\n &#x7B;\n scrapeWindshield: false,\n checkOil: true,\n inflateTires: false,\n extinguishersCount: 1,\n &#x7D;,\n &#x7B;\n scrapeWindshield: true,\n checkOil: true,\n inflateTires: false,\n extinguishersCount: 1,\n &#x7D;,\n &#x7B;\n scrapeWindshield: false,\n checkOil: false,\n inflateTires: true,\n extinguishersCount: 1,\n &#x7D;,\n &#x7B;\n scrapeWindshield: true,\n checkOil: false,\n inflateTires: true,\n extinguishersCount: 1,\n &#x7D;,\n &#x7B;\n scrapeWindshield: false,\n checkOil: true,\n inflateTires: true,\n extinguishersCount: 1,\n &#x7D;,\n &#x7B;\n scrapeWindshield: true,\n checkOil: true,\n inflateTires: true,\n extinguishersCount: 1,\n &#x7D;,\n ]\n);\n\n// let's \"pin\" a value, prepare two sets of options objects,\n// one where scrapeWindshield === true and another with \"false\"\n\n// you'll get 2 ^ (3-1) = 4 variations:\nconst variationsWithScrapeWindshieldOn = mixer(\n &#x7B;\n scrapeWindshield: true,\n &#x7D;,\n defaultOpts\n);\nassert.deepEqual(variationsWithScrapeWindshieldOn, [\n &#x7B;\n scrapeWindshield: true, // <--- pinned\n checkOil: false,\n inflateTires: false,\n extinguishersCount: 1,\n &#x7D;,\n &#x7B;\n scrapeWindshield: true, // <--- pinned\n checkOil: true,\n inflateTires: false,\n extinguishersCount: 1,\n &#x7D;,\n &#x7B;\n scrapeWindshield: true, // <--- pinned\n checkOil: false,\n inflateTires: true,\n extinguishersCount: 1,\n &#x7D;,\n &#x7B;\n scrapeWindshield: true, // <--- pinned\n checkOil: true,\n inflateTires: true,\n extinguishersCount: 1,\n &#x7D;,\n]);\n\n// also 4 variations, similar but with scrapeWindshield === false pinned:\nconst variationsWithScrapeWindshieldOff = mixer(\n &#x7B;\n scrapeWindshield: false,\n &#x7D;,\n defaultOpts\n);\nassert.equal(variationsWithScrapeWindshieldOff.length, 4);"}}