@visulima/object 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- var M=Object.defineProperty;var u=(e,r)=>M(e,"name",{value:r,configurable:!0});function m(e){if(typeof e!="object"||e===null)return!1;const r=Object.getPrototypeOf(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}u(m,"isPlainObject");var j=Object.defineProperty,L=u((e,r)=>j(e,"name",{value:r,configurable:!0}),"n$1");const S=L((e,r)=>{const t=r.split(".");return e.split(".").reduce((n,a,o)=>{const l=t[o]==="*"?"*":a;return n.push(l),n},[]).join(".")===r},"pathsAreEqual");var q=Object.defineProperty,R=u((e,r)=>q(e,"name",{value:r,configurable:!0}),"m$2");const k=R((e,r,t="")=>m(e)?Object.entries(e).reduce((n,[a,o])=>{let l=t;return l&&(l+="."),l+=a,r.some(g=>S(l,g))?n:m(o)?(n[a]=k(e[a],r,l),n):(n[a]=o,n)},{}):e,"recursiveOmit");var B=Object.defineProperty,D=u((e,r)=>B(e,"name",{value:r,configurable:!0}),"r");const K=D(e=>Array.isArray(e)&&e.length>0,"isFullArray"),W=D((e,r)=>K(r)?k(e,r):e,"omit"),Z=W;var C=Object.defineProperty,G=u((e,r)=>C(e,"name",{value:r,configurable:!0}),"h");const $=G((e,r,t="")=>m(e)?Object.entries(e).reduce((n,[a,o])=>{let l=t;if(l&&(l+="."),l+=a,r.length>0){let g=!1;if(r.forEach(O=>{const _=l.split(".").length,x=O.split(".").length,b=O.split(".").slice(0,_).join("."),A=l.split(".").slice(0,x).join(".");S(A,b)&&(g=!0)}),!g)return n}return m(o)?(n[a]=$(e[a],r,l),n):(n[a]=o,n)},{}):e,"recursivePick");var z=Object.defineProperty,N=u((e,r)=>z(e,"name",{value:r,configurable:!0}),"t");const H=N(e=>Array.isArray(e)&&e.length>0,"isFullArray"),J=N((e,r)=>H(r)?$(e,r):{},"pick"),ee=J;var p=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},P={},y={};Object.defineProperty(y,"__esModule",{value:!0});y.isDocumentToRecurOn=y.flatten=y.unique=void 0;function Q(e){return[...new Set(e)]}u(Q,"unique");y.unique=Q;function U(e){return[].concat(...e)}u(U,"flatten");y.flatten=U;function V(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Object.keys(e).length}u(V,"isDocumentToRecurOn");y.isDocumentToRecurOn=V;var T={};Object.defineProperty(T,"__esModule",{value:!0});(function(e){var r=p&&p.__createBinding||(Object.create?function(s,i,f,d){d===void 0&&(d=f);var c=Object.getOwnPropertyDescriptor(i,f);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:u(function(){return i[f]},"get")}),Object.defineProperty(s,d,c)}:function(s,i,f,d){d===void 0&&(d=f),s[d]=i[f]}),t=p&&p.__setModuleDefault||(Object.create?function(s,i){Object.defineProperty(s,"default",{enumerable:!0,value:i})}:function(s,i){s.default=i}),n=p&&p.__importStar||function(s){if(s&&s.__esModule)return s;var i={};if(s!=null)for(var f in s)f!=="default"&&Object.prototype.hasOwnProperty.call(s,f)&&r(i,s,f);return t(i,s),i},a=p&&p.__exportStar||function(s,i){for(var f in s)f!=="default"&&!Object.prototype.hasOwnProperty.call(i,f)&&r(i,s,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.deepKeysFromList=e.deepKeys=void 0;const o=n(y);a(T,e);function l(s,i){const f=A(i);return typeof s=="object"&&s!==null?O("",s,f):[]}u(l,"deepKeys"),e.deepKeys=l;function g(s,i){const f=A(i);return s.map(d=>typeof d=="object"&&d!==null?l(d,f):[])}u(g,"deepKeysFromList"),e.deepKeysFromList=g;function O(s,i,f){const d=Object.keys(i).map(c=>{const w=b(s,x(c,f));return f.expandNestedObjects&&o.isDocumentToRecurOn(i[c])||f.arrayIndexesAsKeys&&Array.isArray(i[c])&&i[c].length?O(w,i[c],f):f.expandArrayObjects&&Array.isArray(i[c])?_(i[c],w,f):f.ignoreEmptyArrays&&Array.isArray(i[c])&&!i[c].length?[]:w});return o.flatten(d)}u(O,"generateDeepKeysList");function _(s,i,f){let d=g(s,f);return s.length?s.length&&o.flatten(d).length===0?[i]:(d=d.map(c=>Array.isArray(c)&&c.length===0?[i]:c.map(w=>b(i,x(w,f)))),o.unique(o.flatten(d))):f.ignoreEmptyArraysWhenExpanding?[]:[i]}u(_,"processArrayKeys");function x(s,i){return i.escapeNestedDots?s.replace(/\./g,"\\."):s}u(x,"escapeNestedDotsIfSpecified");function b(s,i){return s?s+"."+i:i}u(b,"buildKeyName");function A(s){return{arrayIndexesAsKeys:!1,expandNestedObjects:!0,expandArrayObjects:!1,ignoreEmptyArraysWhenExpanding:!1,escapeNestedDots:!1,ignoreEmptyArrays:!1,...s??{}}}u(A,"mergeOptions")})(P);const h=u(e=>{const r=typeof e;return e!==null&&(r==="object"||r==="function")},"isObject"),E=new Set(["__proto__","prototype","constructor"]),X=new Set("0123456789");function v(e){const r=[];let t="",n="start",a=!1;for(const o of e)switch(o){case"\\":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");a&&(t+=o),n="property",a=!a;break}case".":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(a){a=!1,t+=o;break}if(E.has(t))return[];r.push(t),t="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(a){a=!1,t+=o;break}if(n==="property"){if(E.has(t))return[];r.push(t),t=""}n="index";break}case"]":{if(n==="index"){r.push(Number.parseInt(t,10)),t="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!X.has(o))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),a&&(a=!1,t+="\\"),t+=o}}switch(a&&(t+="\\"),n){case"property":{if(E.has(t))return[];r.push(t);break}case"index":throw new Error("Index was not closed");case"start":{r.push("");break}}return r}u(v,"getPathSegments");function I(e,r){if(typeof r!="number"&&Array.isArray(e)){const t=Number.parseInt(r,10);return Number.isInteger(t)&&e[t]===e[r]}return!1}u(I,"isStringIndex");function F(e,r){if(I(e,r))throw new Error("Cannot use string index")}u(F,"assertNotStringIndex");function re(e,r,t){if(!h(e)||typeof r!="string")return t===void 0?e:t;const n=v(r);if(n.length===0)return t;for(let a=0;a<n.length;a++){const o=n[a];if(I(e,o)?e=a===n.length-1?void 0:null:e=e[o],e==null){if(a!==n.length-1)return t;break}}return e===void 0?t:e}u(re,"getProperty");function ne(e,r,t){if(!h(e)||typeof r!="string")return e;const n=e,a=v(r);for(let o=0;o<a.length;o++){const l=a[o];F(e,l),o===a.length-1?e[l]=t:h(e[l])||(e[l]=typeof a[o+1]=="number"?[]:{}),e=e[l]}return n}u(ne,"setProperty");function te(e,r){if(!h(e)||typeof r!="string")return!1;const t=v(r);for(let n=0;n<t.length;n++){const a=t[n];if(F(e,a),n===t.length-1)return delete e[a],!0;if(e=e[a],!h(e))return!1}}u(te,"deleteProperty");function ie(e,r){if(!h(e)||typeof r!="string")return!1;const t=v(r);if(t.length===0)return!1;for(const n of t){if(!h(e)||!(n in e)||I(e,n))return!1;e=e[n]}return!0}u(ie,"hasProperty");function ae(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replaceAll(/[\\.[]/g,"\\$&")}u(ae,"escapePath");const se=P.deepKeys,fe=P.deepKeysFromList;export{se as deepKeys,fe as deepKeysFromList,te as deleteProperty,ae as escapePath,re as getProperty,ie as hasProperty,m as isPlainObject,Z as omit,ee as pick,ne as setProperty};
1
+ var D=Object.defineProperty;var u=(s,c)=>D(s,"name",{value:c,configurable:!0});import{m as F}from"./shared/omit-DClq0ugw.mjs";import{a as q}from"./shared/pick-C02Ru-rn.mjs";import{d as I,e as B,g as W,h as G,s as K}from"./shared/getProperty-BE7cAsTa.mjs";import{i as z}from"./shared/isPlainObject-VVOVbznO.mjs";var a=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},p={},f={};Object.defineProperty(f,"__esModule",{value:!0});f.isDocumentToRecurOn=f.flatten=f.unique=void 0;function P(s){return[...new Set(s)]}u(P,"unique");f.unique=P;function w(s){return[].concat(...s)}u(w,"flatten");f.flatten=w;function x(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&Object.keys(s).length}u(x,"isDocumentToRecurOn");f.isDocumentToRecurOn=x;var j={};Object.defineProperty(j,"__esModule",{value:!0});(function(s){var c=a&&a.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:u(function(){return e[t]},"get")}),Object.defineProperty(r,i,n)}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),A=a&&a.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),m=a&&a.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&c(e,r,t);return A(e,r),e},v=a&&a.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&c(e,r,t)};Object.defineProperty(s,"__esModule",{value:!0}),s.deepKeysFromList=s.deepKeys=void 0;const o=m(f);v(j,s);function d(r,e){const t=_(e);return typeof r=="object"&&r!==null?g("",r,t):[]}u(d,"deepKeys"),s.deepKeys=d;function y(r,e){const t=_(e);return r.map(i=>typeof i=="object"&&i!==null?d(i,t):[])}u(y,"deepKeysFromList"),s.deepKeysFromList=y;function g(r,e,t){const i=Object.keys(e).map(n=>{const l=O(r,b(n,t));return t.expandNestedObjects&&o.isDocumentToRecurOn(e[n])||t.arrayIndexesAsKeys&&Array.isArray(e[n])&&e[n].length?g(l,e[n],t):t.expandArrayObjects&&Array.isArray(e[n])?h(e[n],l,t):t.ignoreEmptyArrays&&Array.isArray(e[n])&&!e[n].length?[]:l});return o.flatten(i)}u(g,"generateDeepKeysList");function h(r,e,t){let i=y(r,t);return r.length?r.length&&o.flatten(i).length===0?[e]:(i=i.map(n=>Array.isArray(n)&&n.length===0?[e]:n.map(l=>O(e,b(l,t)))),o.unique(o.flatten(i))):t.ignoreEmptyArraysWhenExpanding?[]:[e]}u(h,"processArrayKeys");function b(r,e){return e.escapeNestedDots?r.replace(/\./g,"\\."):r}u(b,"escapeNestedDotsIfSpecified");function O(r,e){return r?r+"."+e:e}u(O,"buildKeyName");function _(r){return{arrayIndexesAsKeys:!1,expandNestedObjects:!0,expandArrayObjects:!1,ignoreEmptyArraysWhenExpanding:!1,escapeNestedDots:!1,ignoreEmptyArrays:!1,...r??{}}}u(_,"mergeOptions")})(p);const E=p.deepKeys,L=p.deepKeysFromList;export{E as deepKeys,L as deepKeysFromList,I as deleteProperty,B as escapePath,W as getProperty,G as hasProperty,z as isPlainObject,F as omit,q as pick,K as setProperty};
@@ -0,0 +1 @@
1
+ var p=Object.defineProperty;var s=(r,t)=>p(r,"name",{value:t,configurable:!0});const f=s(r=>{const t=typeof r;return r!==null&&(t==="object"||t==="function")},"isObject"),u=new Set(["__proto__","prototype","constructor"]),c=new Set("0123456789");function o(r){const t=[];let e="",n="start",i=!1;for(const a of r)switch(a){case"\\":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");i&&(e+=a),n="property",i=!i;break}case".":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(i){i=!1,e+=a;break}if(u.has(e))return[];t.push(e),e="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(i){i=!1,e+=a;break}if(n==="property"){if(u.has(e))return[];t.push(e),e=""}n="index";break}case"]":{if(n==="index"){t.push(Number.parseInt(e,10)),e="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!c.has(a))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),i&&(i=!1,e+="\\"),e+=a}}switch(i&&(e+="\\"),n){case"property":{if(u.has(e))return[];t.push(e);break}case"index":throw new Error("Index was not closed");case"start":{t.push("");break}}return t}s(o,"getPathSegments");function l(r,t){if(typeof t!="number"&&Array.isArray(r)){const e=Number.parseInt(t,10);return Number.isInteger(e)&&r[e]===r[t]}return!1}s(l,"isStringIndex");function h(r,t){if(l(r,t))throw new Error("Cannot use string index")}s(h,"assertNotStringIndex");function y(r,t,e){if(!f(r)||typeof t!="string")return e===void 0?r:e;const n=o(t);if(n.length===0)return e;for(let i=0;i<n.length;i++){const a=n[i];if(l(r,a)?r=i===n.length-1?void 0:null:r=r[a],r==null){if(i!==n.length-1)return e;break}}return r===void 0?e:r}s(y,"getProperty");function g(r,t,e){if(!f(r)||typeof t!="string")return r;const n=r,i=o(t);for(let a=0;a<i.length;a++){const d=i[a];h(r,d),a===i.length-1?r[d]=e:f(r[d])||(r[d]=typeof i[a+1]=="number"?[]:{}),r=r[d]}return n}s(g,"setProperty");function w(r,t){if(!f(r)||typeof t!="string")return!1;const e=o(t);for(let n=0;n<e.length;n++){const i=e[n];if(h(r,i),n===e.length-1)return delete r[i],!0;if(r=r[i],!f(r))return!1}}s(w,"deleteProperty");function E(r,t){if(!f(r)||typeof t!="string")return!1;const e=o(t);if(e.length===0)return!1;for(const n of e){if(!f(r)||!(n in r)||l(r,n))return!1;r=r[n]}return!0}s(E,"hasProperty");function I(r){if(typeof r!="string")throw new TypeError("Expected a string");return r.replaceAll(/[\\.[]/g,"\\$&")}s(I,"escapePath");export{w as d,I as e,y as g,E as h,g as s};
@@ -0,0 +1 @@
1
+ "use strict";var h=Object.defineProperty;var s=(r,t)=>h(r,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=s(r=>{const t=typeof r;return r!==null&&(t==="object"||t==="function")},"isObject"),u=new Set(["__proto__","prototype","constructor"]),y=new Set("0123456789");function d(r){const t=[];let n="",e="start",i=!1;for(const a of r)switch(a){case"\\":{if(e==="index")throw new Error("Invalid character in an index");if(e==="indexEnd")throw new Error("Invalid character after an index");i&&(n+=a),e="property",i=!i;break}case".":{if(e==="index")throw new Error("Invalid character in an index");if(e==="indexEnd"){e="property";break}if(i){i=!1,n+=a;break}if(u.has(n))return[];t.push(n),n="",e="property";break}case"[":{if(e==="index")throw new Error("Invalid character in an index");if(e==="indexEnd"){e="index";break}if(i){i=!1,n+=a;break}if(e==="property"){if(u.has(n))return[];t.push(n),n=""}e="index";break}case"]":{if(e==="index"){t.push(Number.parseInt(n,10)),n="",e="indexEnd";break}if(e==="indexEnd")throw new Error("Invalid character after an index")}default:{if(e==="index"&&!y.has(a))throw new Error("Invalid character in an index");if(e==="indexEnd")throw new Error("Invalid character after an index");e==="start"&&(e="property"),i&&(i=!1,n+="\\"),n+=a}}switch(i&&(n+="\\"),e){case"property":{if(u.has(n))return[];t.push(n);break}case"index":throw new Error("Index was not closed");case"start":{t.push("");break}}return t}s(d,"getPathSegments");function l(r,t){if(typeof t!="number"&&Array.isArray(r)){const n=Number.parseInt(t,10);return Number.isInteger(n)&&r[n]===r[t]}return!1}s(l,"isStringIndex");function p(r,t){if(l(r,t))throw new Error("Cannot use string index")}s(p,"assertNotStringIndex");function c(r,t,n){if(!f(r)||typeof t!="string")return n===void 0?r:n;const e=d(t);if(e.length===0)return n;for(let i=0;i<e.length;i++){const a=e[i];if(l(r,a)?r=i===e.length-1?void 0:null:r=r[a],r==null){if(i!==e.length-1)return n;break}}return r===void 0?n:r}s(c,"getProperty");function g(r,t,n){if(!f(r)||typeof t!="string")return r;const e=r,i=d(t);for(let a=0;a<i.length;a++){const o=i[a];p(r,o),a===i.length-1?r[o]=n:f(r[o])||(r[o]=typeof i[a+1]=="number"?[]:{}),r=r[o]}return e}s(g,"setProperty");function x(r,t){if(!f(r)||typeof t!="string")return!1;const n=d(t);for(let e=0;e<n.length;e++){const i=n[e];if(p(r,i),e===n.length-1)return delete r[i],!0;if(r=r[i],!f(r))return!1}}s(x,"deleteProperty");function w(r,t){if(!f(r)||typeof t!="string")return!1;const n=d(t);if(n.length===0)return!1;for(const e of n){if(!f(r)||!(e in r)||l(r,e))return!1;r=r[e]}return!0}s(w,"hasProperty");function E(r){if(typeof r!="string")throw new TypeError("Expected a string");return r.replaceAll(/[\\.[]/g,"\\$&")}s(E,"escapePath");exports.deleteProperty=x;exports.escapePath=E;exports.getProperty=c;exports.hasProperty=w;exports.setProperty=g;
@@ -0,0 +1 @@
1
+ "use strict";var n=Object.defineProperty;var o=(t,e)=>n(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}o(r,"isPlainObject");exports.isPlainObject=r;
@@ -0,0 +1 @@
1
+ var n=Object.defineProperty;var e=(t,o)=>n(t,"name",{value:o,configurable:!0});function i(t){if(typeof t!="object"||t===null)return!1;const o=Object.getPrototypeOf(t);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}e(i,"isPlainObject");export{i};
@@ -0,0 +1 @@
1
+ "use strict";var m=Object.defineProperty;var n=(e,r)=>m(e,"name",{value:r,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./isPlainObject-B0tpqX_G.cjs"),v=require("./paths-are-equal-D8teV-Y-.cjs");var O=Object.defineProperty,j=n((e,r)=>O(e,"name",{value:r,configurable:!0}),"m$1");const o=j((e,r,s="")=>l.isPlainObject(e)?Object.entries(e).reduce((a,[t,c])=>{let i=s;return i&&(i+="."),i+=t,r.some(b=>v.c(i,b))?a:l.isPlainObject(c)?(a[t]=o(e[t],r,i),a):(a[t]=c,a)},{}):e,"recursiveOmit");var y=Object.defineProperty,u=n((e,r)=>y(e,"name",{value:r,configurable:!0}),"r");const f=u(e=>Array.isArray(e)&&e.length>0,"isFullArray"),P=u((e,r)=>f(r)?o(e,r):e,"omit");exports.m=P;
@@ -0,0 +1 @@
1
+ var s=Object.defineProperty;var o=(r,e)=>s(r,"name",{value:e,configurable:!0});import{i as c}from"./isPlainObject-VVOVbznO.mjs";import{c as v}from"./paths-are-equal-BgwMgI_D.mjs";var b=Object.defineProperty,p=o((r,e)=>b(r,"name",{value:e,configurable:!0}),"m$1");const m=p((r,e,u="")=>c(r)?Object.entries(r).reduce((a,[n,t])=>{let i=u;return i&&(i+="."),i+=n,e.some(f=>v(i,f))?a:c(t)?(a[n]=m(r[n],e,i),a):(a[n]=t,a)},{}):r,"recursiveOmit");var y=Object.defineProperty,l=o((r,e)=>y(r,"name",{value:e,configurable:!0}),"r");const O=l(r=>Array.isArray(r)&&r.length>0,"isFullArray"),A=l((r,e)=>O(e)?m(r,e):r,"omit");export{A as m};
@@ -0,0 +1 @@
1
+ var u=Object.defineProperty;var t=(r,e)=>u(r,"name",{value:e,configurable:!0});var p=Object.defineProperty,l=t((r,e)=>p(r,"name",{value:e,configurable:!0}),"n");const d=l((r,e)=>{const o=e.split(".");return r.split(".").reduce((n,a,c)=>{const s=o[c]==="*"?"*":a;return n.push(s),n},[]).join(".")===e},"pathsAreEqual");export{d as c};
@@ -0,0 +1 @@
1
+ "use strict";var o=Object.defineProperty;var n=(r,e)=>o(r,"name",{value:e,configurable:!0});var i=Object.defineProperty,l=n((r,e)=>i(r,"name",{value:e,configurable:!0}),"n");const p=l((r,e)=>{const c=e.split(".");return r.split(".").reduce((t,s,u)=>{const a=c[u]==="*"?"*":s;return t.push(a),t},[]).join(".")===e},"pathsAreEqual");exports.c=p;
@@ -0,0 +1 @@
1
+ var j=Object.defineProperty;var a=(e,r)=>j(e,"name",{value:r,configurable:!0});import{i as s}from"./isPlainObject-VVOVbznO.mjs";import{c as m}from"./paths-are-equal-BgwMgI_D.mjs";var y=Object.defineProperty,P=a((e,r)=>y(e,"name",{value:r,configurable:!0}),"h");const p=P((e,r,f="")=>s(e)?Object.entries(e).reduce((t,[l,c])=>{let i=f;if(i&&(i+="."),i+=l,r.length>0){let n=!1;if(r.forEach(o=>{const v=i.split(".").length,b=o.split(".").length,g=o.split(".").slice(0,v).join("."),h=i.split(".").slice(0,b).join(".");m(h,g)&&(n=!0)}),!n)return t}return s(c)?(t[l]=p(e[l],r,i),t):(t[l]=c,t)},{}):e,"recursivePick");var d=Object.defineProperty,u=a((e,r)=>d(e,"name",{value:r,configurable:!0}),"t");const O=u(e=>Array.isArray(e)&&e.length>0,"isFullArray"),x=u((e,r)=>O(r)?p(e,r):{},"pick");export{x as a};
@@ -0,0 +1 @@
1
+ "use strict";var P=Object.defineProperty;var a=(e,r)=>P(e,"name",{value:r,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./isPlainObject-B0tpqX_G.cjs"),h=require("./paths-are-equal-D8teV-Y-.cjs");var y=Object.defineProperty,O=a((e,r)=>y(e,"name",{value:r,configurable:!0}),"h");const o=O((e,r,p="")=>u.isPlainObject(e)?Object.entries(e).reduce((i,[l,c])=>{let t=p;if(t&&(t+="."),t+=l,r.length>0){let n=!1;if(r.forEach(s=>{const j=t.split(".").length,f=s.split(".").length,g=s.split(".").slice(0,j).join("."),v=t.split(".").slice(0,f).join(".");h.c(v,g)&&(n=!0)}),!n)return i}return u.isPlainObject(c)?(i[l]=o(e[l],r,t),i):(i[l]=c,i)},{}):e,"recursivePick");var d=Object.defineProperty,b=a((e,r)=>d(e,"name",{value:r,configurable:!0}),"t");const A=b(e=>Array.isArray(e)&&e.length>0,"isFullArray"),m=b((e,r)=>A(r)?o(e,r):{},"pick");exports.a=m;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/object",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Helper functions for working with objects and arrays.",
5
5
  "keywords": [
6
6
  "visulima",
@@ -19,12 +19,16 @@
19
19
  "property",
20
20
  "set",
21
21
  "transform",
22
- "typescript",
23
- "object"
22
+ "typescript"
24
23
  ],
25
- "author": {
26
- "name": "Daniel Bannert",
27
- "email": "d.bannert@anolilab.de"
24
+ "homepage": "https://visulima.com/packages/object",
25
+ "bugs": {
26
+ "url": "https://github.com/visulima/visulima/issues"
27
+ },
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/visulima/visulima.git",
31
+ "directory": "packages/object"
28
32
  },
29
33
  "funding": [
30
34
  {
@@ -36,8 +40,11 @@
36
40
  "url": "https://anolilab.com/support"
37
41
  }
38
42
  ],
39
- "homepage": "https://visulima.com/packages/object",
40
43
  "license": "MIT",
44
+ "author": {
45
+ "name": "Daniel Bannert",
46
+ "email": "d.bannert@anolilab.de"
47
+ },
41
48
  "sideEffects": false,
42
49
  "type": "module",
43
50
  "exports": {
@@ -57,47 +64,37 @@
57
64
  "module": "dist/index.mjs",
58
65
  "browser": "./dist/index.mjs",
59
66
  "types": "dist/index.d.ts",
67
+ "typesVersions": {
68
+ "*": {
69
+ "*": [
70
+ "./dist/index.d.ts"
71
+ ]
72
+ }
73
+ },
60
74
  "files": [
61
75
  "dist",
62
76
  "README.md",
63
77
  "CHANGELOG.md"
64
78
  ],
65
- "repository": {
66
- "type": "git",
67
- "url": "git+https://github.com/visulima/visulima.git",
68
- "directory": "packages/object"
69
- },
70
- "bugs": {
71
- "url": "https://github.com/visulima/visulima/issues"
72
- },
73
- "engines": {
74
- "node": ">=18.* <=22.*"
75
- },
76
- "publishConfig": {
77
- "access": "public",
78
- "provenance": true
79
- },
80
79
  "devDependencies": {
81
- "is-plain-obj": "^4.1.0",
82
- "dot-prop": "^9.0.0",
83
- "filter-obj": "^6.1.0",
84
- "deeks": "^3.1.1",
85
80
  "@anolilab/eslint-config": "^15.0.3",
86
81
  "@anolilab/prettier-config": "^5.0.14",
87
82
  "@anolilab/semantic-release-pnpm": "1.1.3",
88
83
  "@anolilab/semantic-release-preset": "^9.0.0",
89
- "@babel/core": "^7.24.7",
90
- "@rushstack/eslint-plugin-security": "^0.8.1",
84
+ "@arethetypeswrong/cli": "^0.15.4",
85
+ "@babel/core": "^7.25.2",
86
+ "@rushstack/eslint-plugin-security": "^0.8.2",
91
87
  "@secretlint/secretlint-rule-preset-recommend": "^8.2.4",
92
- "@total-typescript/ts-reset": "^0.5.1",
88
+ "@total-typescript/ts-reset": "^0.6.1",
93
89
  "@types/node": "18.19.39",
94
- "@visulima/packem": "^1.0.0-alpha.49",
95
- "@vitest/coverage-v8": "^2.0.1",
96
- "@vitest/ui": "^2.0.1",
90
+ "@visulima/packem": "^1.0.0-alpha.93",
91
+ "@vitest/coverage-v8": "^2.0.5",
92
+ "@vitest/ui": "^2.0.5",
97
93
  "conventional-changelog-conventionalcommits": "8.0.0",
98
94
  "cross-env": "^7.0.3",
99
- "esbuild": "^0.23.0",
100
- "type-fest": "^4.21.0",
95
+ "deeks": "^3.1.1",
96
+ "dot-prop": "^9.0.0",
97
+ "esbuild": "^0.23.1",
101
98
  "eslint": "8.57.0",
102
99
  "eslint-plugin-deprecation": "^3.0.0",
103
100
  "eslint-plugin-etc": "^2.0.3",
@@ -105,12 +102,22 @@
105
102
  "eslint-plugin-mdx": "^3.1.5",
106
103
  "eslint-plugin-vitest": "0.4.1",
107
104
  "eslint-plugin-vitest-globals": "^1.5.0",
108
- "prettier": "^3.3.2",
105
+ "filter-obj": "^6.1.0",
106
+ "is-plain-obj": "^4.1.0",
107
+ "prettier": "^3.3.3",
109
108
  "rimraf": "5.0.9",
110
109
  "secretlint": "8.2.4",
111
- "semantic-release": "^24.0.0",
112
- "typescript": "^5.5.3",
113
- "vitest": "^2.0.1"
110
+ "semantic-release": "^24.1.0",
111
+ "type-fest": "^4.26.0",
112
+ "typescript": "5.5.4",
113
+ "vitest": "^2.0.5"
114
+ },
115
+ "engines": {
116
+ "node": ">=18.* <=22.*"
117
+ },
118
+ "publishConfig": {
119
+ "access": "public",
120
+ "provenance": true
114
121
  },
115
122
  "anolilab": {
116
123
  "eslint-config": {
@@ -130,6 +137,7 @@
130
137
  "build:prod": "cross-env NODE_ENV=production packem build",
131
138
  "clean": "rimraf node_modules dist .eslintcache",
132
139
  "dev": "pnpm run build --watch",
140
+ "lint:attw": "attw --pack",
133
141
  "lint:eslint": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs",
134
142
  "lint:eslint:fix": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs --fix",
135
143
  "lint:package-json": "publint --strict",