object-boolean-combinations 6.3.0 → 6.3.1

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,11 +3,17 @@
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.3.1 (2026-08-22)
7
+
8
+ ### Performance Improvements
9
+
10
+ - optimise package hot paths and JSON editing ([f3112bd](https://github.com/codsen/codsen/commit/f3112bd7fc0d7c9bc09312d3744c950691d72ca5))
11
+
6
12
  ## 6.3.0 (2026-08-19)
7
13
 
8
14
  ### Bug Fixes
9
15
 
10
- - resolve review findings REV-004 through REV-007 ([b60e9ee](https://github.com/codsen/codsen/commit/b60e9eeb499af94685cfb87b4970fe025be1fc10))
16
+ - resolve various review findings ([b60e9ee](https://github.com/codsen/codsen/commit/b60e9eeb499af94685cfb87b4970fe025be1fc10))
11
17
  - retire direct publish aliases ([f98e31e](https://github.com/codsen/codsen/commit/f98e31eb89bc185471225664e610b55f34fbf648))
12
18
  - tweak types ([d1360f6](https://github.com/codsen/codsen/commit/d1360f60b86ca156e2e97bebc52c3577422678f3))
13
19
 
@@ -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.3.0
4
+ * @version 6.3.1
5
5
  * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/object-boolean-combinations/}
8
8
  */
9
9
 
10
- import{deepClone as f,isPlainObject as m}from"codsen-utils";var b="6.3.0";var v=b;function w(n,o={}){if(!n)throw new Error("object-boolean-combinations/combinations(): [THROW_ID_01] missing input object");if(!m(n))throw new Error("object-boolean-combinations/combinations(): [THROW_ID_02] the first input object must be a plain object");if(o&&!m(o))throw new Error("object-boolean-combinations/combinations(): [THROW_ID_03] the second override object must be a plain object");let c=Object.keys(n),d=new Set(c),s=Object.keys(o).filter(e=>d.has(e)),u=new Set(s),i=c.filter(e=>!u.has(e)),a=s.length?f(o):null,l=2**i.length,p=new Array(l);for(let e=0;e<l;e++){let r={};for(let t=0;t<i.length;t++)r[i[t]]=(e&1<<t)!==0;if(a)for(let t of s)r[t]=a[t];p[e]=r}return p}export{w as combinations,v as version};
10
+ import{deepClone as f,isPlainObject as m}from"codsen-utils";var b="6.3.1";var v=b;function w(n,o={}){if(!n)throw new Error("object-boolean-combinations/combinations(): [THROW_ID_01] missing input object");if(!m(n))throw new Error("object-boolean-combinations/combinations(): [THROW_ID_02] the first input object must be a plain object");if(o&&!m(o))throw new Error("object-boolean-combinations/combinations(): [THROW_ID_03] the second override object must be a plain object");let c=Object.keys(n),d=new Set(c),s=Object.keys(o).filter(e=>d.has(e)),u=new Set(s),i=c.filter(e=>!u.has(e)),a=s.length?f(o):null,l=2**i.length,p=new Array(l);for(let e=0;e<l;e++){let r={};for(let t=0;t<i.length;t++)r[i[t]]=(e&1<<t)!==0;if(a)for(let t of s)r[t]=a[t];p[e]=r}return p}export{w as combinations,v as version};
@@ -1,17 +1,17 @@
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.3.0
4
+ * @version 6.3.1
5
5
  * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/object-boolean-combinations/}
8
8
  */
9
9
 
10
- "use strict";var objectBooleanCombinations=(()=>{var d=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var O=Object.prototype.hasOwnProperty;var x=(e,t,r)=>t in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var C=(e,t)=>{for(var r in t)d(e,r,{get:t[r],enumerable:!0})},k=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of j(t))!O.call(e,i)&&i!==r&&d(e,i,{get:()=>t[i],enumerable:!(o=A(t,i))||o.enumerable});return e};var S=e=>k(d({},"__esModule",{value:!0}),e);var h=(e,t,r)=>x(e,typeof t!="symbol"?t+"":t,r);var R={};C(R,{combinations:()=>I,version:()=>$});var L=new Set([..."\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4","$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]);var W=class{constructor(){h(this,"hasRepeatedReferences",!1);h(this,"clones",[]);h(this,"index");h(this,"sources",[])}get(e){if(this.index){let r=this.index.get(e);return r!==void 0&&(this.hasRepeatedReferences=!0),r}let t=this.sources.indexOf(e);if(t!==-1)return this.hasRepeatedReferences=!0,this.clones[t]}set(e,t){if(this.index){this.index.set(e,t);return}if(this.sources.push(e),this.clones.push(t),this.sources.length===32){this.index=new WeakMap;for(let r=0;r<this.sources.length;r++)this.index.set(this.sources[r],this.clones[r]);this.sources=[],this.clones=[]}}};function y(e,t){let r=t.get(e);if(r!==void 0)return r;let o=e.slice(0);return t.set(e,o),o}function D(e,t){if(typeof Buffer<"u"&&Buffer.isBuffer(e)){let n=Buffer.from(e);return t.set(e,n),n}let r=y(e.buffer,t);if(e instanceof DataView){let n=new DataView(r,e.byteOffset,e.byteLength);return t.set(e,n),n}let o=e.constructor,i=new o(r,e.byteOffset,e.length);return t.set(e,i),i}function b(e,t,r,o){for(let i of r){let n=t[i];e[i]=typeof n!="object"||n===null?n:p(n,o)}}function p(e,t){if(typeof e!="object"||e===null)return e;let r=t.get(e);if(r!==void 0)return r;if(Array.isArray(e)){let n=e.length,l=new Array(n);t.set(e,l);let u=e,c=Object.keys(e);if(c.length===n&&(n===0||c[n-1]==="".concat(n-1)))for(let a=0;a<n;a++){let s=u[a];l[a]=typeof s!="object"||s===null?s:p(s,t)}else b(l,u,c,t);return l}let o=Object.getPrototypeOf(e);if(o===Object.prototype||o===null){let n={};return t.set(e,n),b(n,e,Object.keys(e),t),n}if(e instanceof Date){let n=new Date(e.getTime());return t.set(e,n),n}if(ArrayBuffer.isView(e))return D(e,t);if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return y(e,t);if(e instanceof Map){let n=new Map;t.set(e,n);for(let[l,u]of e)n.set(p(l,t),p(u,t));return n}if(e instanceof Set){let n=new Set;t.set(e,n);for(let l of e)n.add(p(l,t));return n}let i={};return t.set(e,i),b(i,e,Object.keys(e),t),i}function v(e){return p(e,new W)}function m(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 w="6.3.0";var $=w;function I(e,t={}){if(!e)throw new Error("object-boolean-combinations/combinations(): [THROW_ID_01] missing input object");if(!m(e))throw new Error("object-boolean-combinations/combinations(): [THROW_ID_02] the first input object must be a plain object");if(t&&!m(t))throw new Error("object-boolean-combinations/combinations(): [THROW_ID_03] the second override object must be a plain object");let r=Object.keys(e),o=new Set(r),i=Object.keys(t).filter(s=>o.has(s)),n=new Set(i),l=r.filter(s=>!n.has(s)),u=i.length?v(t):null,c=2**l.length,a=new Array(c);for(let s=0;s<c;s++){let g={};for(let f=0;f<l.length;f++)g[l[f]]=(s&1<<f)!==0;if(u)for(let f of i)g[f]=u[f];a[s]=g}return a}return S(R);})();
10
+ "use strict";var objectBooleanCombinations=(()=>{var d=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var x=(e,t,n)=>t in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var k=(e,t)=>{for(var n in t)d(e,n,{get:t[n],enumerable:!0})},S=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of O(t))!C.call(e,i)&&i!==n&&d(e,i,{get:()=>t[i],enumerable:!(o=w(t,i))||o.enumerable});return e};var D=e=>S(d({},"__esModule",{value:!0}),e);var h=(e,t,n)=>x(e,typeof t!="symbol"?t+"":t,n);var B={};k(B,{combinations:()=>M,version:()=>$});var T=new Set([..."\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4","$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]);var R=class{constructor(){h(this,"hasRepeatedReferences",!1);h(this,"clones",[]);h(this,"index");h(this,"sources",[])}get(e){if(this.index){let n=this.index.get(e);return n!==void 0&&(this.hasRepeatedReferences=!0),n}let t=this.sources.indexOf(e);if(t!==-1)return this.hasRepeatedReferences=!0,this.clones[t]}set(e,t){if(this.index){this.index.set(e,t);return}if(this.sources.push(e),this.clones.push(t),this.sources.length===32){this.index=new WeakMap;for(let n=0;n<this.sources.length;n++)this.index.set(this.sources[n],this.clones[n]);this.sources=[],this.clones=[]}}};function v(e,t){let n=t.get(e);if(n!==void 0)return n;let o=e.slice(0);return t.set(e,o),o}function W(e,t){if(typeof Buffer<"u"&&Buffer.isBuffer(e)){let r=Buffer.from(e);return t.set(e,r),r}let n=v(e.buffer,t);if(e instanceof DataView){let r=new DataView(n,e.byteOffset,e.byteLength);return t.set(e,r),r}let o=e.constructor,i=new o(n,e.byteOffset,e.length);return t.set(e,i),i}function b(e,t,n,o){for(let i of n){let r=t[i];e[i]=typeof r!="object"||r===null?r:p(r,o)}}function p(e,t){if(typeof e!="object"||e===null)return e;let n=t.get(e);if(n!==void 0)return n;if(Array.isArray(e)){let r=e.length,l=new Array(r);t.set(e,l);let u=e,c=Object.keys(e);if(c.length===r&&(r===0||c[r-1]==="".concat(r-1)))for(let a=0;a<r;a++){let s=u[a];l[a]=typeof s!="object"||s===null?s:p(s,t)}else b(l,u,c,t);return l}let o=Object.getPrototypeOf(e);if(o===Object.prototype||o===null){let r={};return t.set(e,r),b(r,e,Object.keys(e),t),r}if(e instanceof Date){let r=new Date(e.getTime());return t.set(e,r),r}if(ArrayBuffer.isView(e))return W(e,t);if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return v(e,t);if(e instanceof Map){let r=new Map;t.set(e,r);for(let[l,u]of e)r.set(p(l,t),p(u,t));return r}if(e instanceof Set){let r=new Set;t.set(e,r);for(let l of e)r.add(p(l,t));return r}let i={};return t.set(e,i),b(i,e,Object.keys(e),t),i}function A(e){return p(e,new R)}function m(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 y,L=(y=Object.getOwnPropertyDescriptor(RegExp.prototype,"source"))==null?void 0:y.get;var P=Date.prototype.getTime;var j="6.3.1";var $=j;function M(e,t={}){if(!e)throw new Error("object-boolean-combinations/combinations(): [THROW_ID_01] missing input object");if(!m(e))throw new Error("object-boolean-combinations/combinations(): [THROW_ID_02] the first input object must be a plain object");if(t&&!m(t))throw new Error("object-boolean-combinations/combinations(): [THROW_ID_03] the second override object must be a plain object");let n=Object.keys(e),o=new Set(n),i=Object.keys(t).filter(s=>o.has(s)),r=new Set(i),l=n.filter(s=>!r.has(s)),u=i.length?A(t):null,c=2**l.length,a=new Array(c);for(let s=0;s<c;s++){let g={};for(let f=0;f<l.length;f++)g[l[f]]=(s&1<<f)!==0;if(u)for(let f of i)g[f]=u[f];a[s]=g}return a}return D(B);})();
11
11
  /**
12
12
  * @name codsen-utils
13
13
  * @fileoverview Various utility functions
14
- * @version 1.8.0
14
+ * @version 1.9.0
15
15
  * @author Roy Revelt
16
16
  * @license MIT
17
17
  * {@link https://codsen.com/os/codsen-utils/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "object-boolean-combinations",
3
- "version": "6.3.0",
3
+ "version": "6.3.1",
4
4
  "description": "Consumes a defaults object with booleans, generates all possible variations of it",
5
5
  "keywords": [
6
6
  "all",
@@ -66,7 +66,7 @@
66
66
  }
67
67
  },
68
68
  "dependencies": {
69
- "codsen-utils": "^1.8.0"
69
+ "codsen-utils": "^1.9.0"
70
70
  },
71
71
  "engines": {
72
72
  "node": ">=18.20.8"