ast-loose-compare 4.0.30 → 4.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/.eslintcache ADDED
@@ -0,0 +1 @@
1
+ [{"/home/runner/work/codsen/codsen/packages/ast-loose-compare/examples/_quickTake.js":"1","/home/runner/work/codsen/codsen/packages/ast-loose-compare/examples/more-examples.js":"2","/home/runner/work/codsen/codsen/packages/ast-loose-compare/examples/whitespace.js":"3","/home/runner/work/codsen/codsen/packages/ast-loose-compare/perf/check.js":"4","/home/runner/work/codsen/codsen/packages/ast-loose-compare/rollup.config.js":"5","/home/runner/work/codsen/codsen/packages/ast-loose-compare/src/main.ts":"6","/home/runner/work/codsen/codsen/packages/ast-loose-compare/test/test.js":"7"},{"size":331,"mtime":1760566739071,"results":"8","hashOfConfig":"9"},{"size":877,"mtime":1760566739071,"results":"10","hashOfConfig":"9"},{"size":321,"mtime":1760566739071,"results":"11","hashOfConfig":"9"},{"size":385,"mtime":1760566739072,"results":"12","hashOfConfig":"13"},{"size":373,"mtime":1760566739072,"results":"14","hashOfConfig":"9"},{"size":4035,"mtime":1760566739072,"results":"15","hashOfConfig":"13"},{"size":11548,"mtime":1760566739072,"results":"16","hashOfConfig":"17"},{"filePath":"18","messages":"19","suppressedMessages":"20","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1nlhngw",{"filePath":"21","messages":"22","suppressedMessages":"23","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","suppressedMessages":"26","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"27","messages":"28","suppressedMessages":"29","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xjytlu",{"filePath":"30","messages":"31","suppressedMessages":"32","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","suppressedMessages":"35","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","suppressedMessages":"38","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"nrihsz","/home/runner/work/codsen/codsen/packages/ast-loose-compare/examples/_quickTake.js",[],[],"/home/runner/work/codsen/codsen/packages/ast-loose-compare/examples/more-examples.js",[],[],"/home/runner/work/codsen/codsen/packages/ast-loose-compare/examples/whitespace.js",[],[],"/home/runner/work/codsen/codsen/packages/ast-loose-compare/perf/check.js",[],[],"/home/runner/work/codsen/codsen/packages/ast-loose-compare/rollup.config.js",[],[],"/home/runner/work/codsen/codsen/packages/ast-loose-compare/src/main.ts",[],[],"/home/runner/work/codsen/codsen/packages/ast-loose-compare/test/test.js",[],["39","40","41","42","43","44"],{"ruleId":"45","severity":2,"message":"46","line":3,"column":17,"nodeType":null,"messageId":"47","endLine":3,"endColumn":19,"suppressions":"48"},{"ruleId":"45","severity":2,"message":"49","line":3,"column":21,"nodeType":null,"messageId":"47","endLine":3,"endColumn":23,"suppressions":"50"},{"ruleId":"45","severity":2,"message":"51","line":3,"column":25,"nodeType":null,"messageId":"47","endLine":3,"endColumn":31,"suppressions":"52"},{"ruleId":"45","severity":2,"message":"53","line":3,"column":33,"nodeType":null,"messageId":"47","endLine":3,"endColumn":37,"suppressions":"54"},{"ruleId":"45","severity":2,"message":"55","line":3,"column":39,"nodeType":null,"messageId":"47","endLine":3,"endColumn":42,"suppressions":"56"},{"ruleId":"45","severity":2,"message":"57","line":3,"column":44,"nodeType":null,"messageId":"47","endLine":3,"endColumn":49,"suppressions":"58"},"@typescript-eslint/no-unused-vars","'is' is defined but never used.","unusedVar",["59"],"'ok' is defined but never used.",["60"],"'throws' is defined but never used.",["61"],"'type' is defined but never used.",["62"],"'not' is defined but never used.",["63"],"'match' is defined but never used.",["64"],{"kind":"65","justification":"66"},{"kind":"65","justification":"66"},{"kind":"65","justification":"66"},{"kind":"65","justification":"66"},{"kind":"65","justification":"66"},{"kind":"65","justification":"66"},"directive",""]
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
+ ## 4.1.0 (2025-10-15)
7
+
8
+ ### Features
9
+
10
+ - if value to be added is a number, keep it as is, don't stringify ([ce3e1a5](https://github.com/codsen/codsen/commit/ce3e1a525998ca3c0abf0142affef95b14cd1990))
11
+
6
12
  ## 4.0.0 (2022-12-01)
7
13
 
8
14
  ### BREAKING CHANGES
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2010-2025 Roy Revelt and other contributors
3
+ Copyright © 2010-2025 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
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
19
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
20
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
21
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -67,8 +67,8 @@ To report bugs or request features or assistance, [raise an issue](https://githu
67
67
 
68
68
  ## Licence
69
69
 
70
- MIT License.
70
+ MIT License
71
71
 
72
- Copyright © 2010-2025 Roy Revelt and other contributors.
72
+ Copyright © 2010-2025 Roy Revelt and other contributors
73
73
 
74
74
  <p align="center"><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"></p>
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name ast-loose-compare
3
3
  * @fileoverview Compare anything: AST, objects, arrays and strings
4
- * @version 4.0.30
5
- * @author Roy Revelt, Codsen Ltd
4
+ * @version 4.1.0
5
+ * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/ast-loose-compare/}
8
8
  */
9
9
 
10
- import{empty as r}from"ast-contains-only-empty-space";import{isPlainObject as p}from"codsen-utils";var l="4.0.30";var m=l;function a(t,e,s){function u(o){return o!=null}let n,i;if(s===void 0){if(!u(t)||!u(e))return}else if(!u(t)||!u(e))return!1;if(s=s||!0,typeof t!=typeof e)return!!(r(t)&&r(e));if(Array.isArray(t)&&Array.isArray(e))if(e.length){for(n=0,i=e.length;n<i;n++)if(Array.isArray(e[n])||p(e[n])){if(s=a(t[n],e[n],s),!s)return!1}else if(e[n]!==t[n])return!!(r(e[n])&&r(t[n]))}else return!!(e.length===0&&t.length===0||r(e)&&r(t));else if(p(t)&&p(e))if(Object.keys(e).length){let o=Object.keys(e);for(n=0,i=o.length;n<i;n++)if(Array.isArray(e[o[n]])||p(e[o[n]])||typeof e[o[n]]=="string"){if(s=a(t[o[n]],e[o[n]],s),!s)return!1}else if(e[o[n]]!==t[o[n]]&&(!r(e[o[n]])||!r(t[o[n]])))return!1}else return!!(Object.keys(e).length===0&&Object.keys(t).length===0||r(e)&&r(t));else if(typeof t=="string"&&typeof e=="string"){if(t!==e)return!!(r(e)&&r(t))}else return!!(r(e)&&r(t));return s}function k(t,e){return a(t,e)}export{k as looseCompare,m as version};
10
+ import{empty as r}from"ast-contains-only-empty-space";import{isPlainObject as p}from"codsen-utils";var c="4.1.0";var m=c;function a(t,e,s){function u(o){return o!=null}let n,i;if(s===void 0){if(!u(t)||!u(e))return}else if(!u(t)||!u(e))return!1;if(s=s||!0,typeof t!=typeof e)return!!(r(t)&&r(e));if(Array.isArray(t)&&Array.isArray(e))if(e.length){for(n=0,i=e.length;n<i;n++)if(Array.isArray(e[n])||p(e[n])){if(s=a(t[n],e[n],s),!s)return!1}else if(e[n]!==t[n])return!!(r(e[n])&&r(t[n]))}else return!!(e.length===0&&t.length===0||r(e)&&r(t));else if(p(t)&&p(e))if(Object.keys(e).length){let o=Object.keys(e);for(n=0,i=o.length;n<i;n++)if(Array.isArray(e[o[n]])||p(e[o[n]])||typeof e[o[n]]=="string"){if(s=a(t[o[n]],e[o[n]],s),!s)return!1}else if(e[o[n]]!==t[o[n]]&&(!r(e[o[n]])||!r(t[o[n]])))return!1}else return!!(Object.keys(e).length===0&&Object.keys(t).length===0||r(e)&&r(t));else if(typeof t=="string"&&typeof e=="string"){if(t!==e)return!!(r(e)&&r(t))}else return!!(r(e)&&r(t));return s}function k(t,e){return a(t,e)}export{k as looseCompare,m as version};
@@ -1,42 +1,42 @@
1
1
  /**
2
2
  * @name ast-loose-compare
3
3
  * @fileoverview Compare anything: AST, objects, arrays and strings
4
- * @version 4.0.30
5
- * @author Roy Revelt, Codsen Ltd
4
+ * @version 4.1.0
5
+ * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/ast-loose-compare/}
8
8
  */
9
9
 
10
- "use strict";var astLooseCompare=(()=>{var J=Object.create;var w=Object.defineProperty,P=Object.defineProperties,M=Object.getOwnPropertyDescriptor,T=Object.getOwnPropertyDescriptors,L=Object.getOwnPropertyNames,S=Object.getOwnPropertySymbols,R=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var V=(r,e,s)=>e in r?w(r,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[e]=s,g=(r,e)=>{for(var s in e||(e={}))B.call(e,s)&&V(r,s,e[s]);if(S)for(var s of S(e))F.call(e,s)&&V(r,s,e[s]);return r},x=(r,e)=>P(r,T(e));var H=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),K=(r,e)=>{for(var s in e)w(r,s,{get:e[s],enumerable:!0})},D=(r,e,s,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of L(e))!B.call(r,u)&&u!==s&&w(r,u,{get:()=>e[u],enumerable:!(l=M(e,u))||l.enumerable});return r};var j=(r,e,s)=>(s=r!=null?J(R(r)):{},D(e||!r||!r.__esModule?w(s,"default",{value:r,enumerable:!0}):s,r)),Q=r=>D(w({},"__esModule",{value:!0}),r);var b=H((Y,U)=>{"use strict";U.exports=q;function A(r){return r instanceof Buffer?Buffer.from(r):new r.constructor(r.buffer.slice(),r.byteOffset,r.length)}function q(r){if(r=r||{},r.circles)return W(r);let e=new Map;if(e.set(Date,n=>new Date(n)),e.set(Map,(n,c)=>new Map(l(Array.from(n),c))),e.set(Set,(n,c)=>new Set(l(Array.from(n),c))),r.constructorHandlers)for(let n of r.constructorHandlers)e.set(n[0],n[1]);let s=null;return r.proto?p:u;function l(n,c){let t=Object.keys(n),i=new Array(t.length);for(let a=0;a<t.length;a++){let o=t[a],f=n[o];typeof f!="object"||f===null?i[o]=f:f.constructor!==Object&&(s=e.get(f.constructor))?i[o]=s(f,c):ArrayBuffer.isView(f)?i[o]=A(f):i[o]=c(f)}return i}function u(n){if(typeof n!="object"||n===null)return n;if(Array.isArray(n))return l(n,u);if(n.constructor!==Object&&(s=e.get(n.constructor)))return s(n,u);let c={};for(let t in n){if(Object.hasOwnProperty.call(n,t)===!1)continue;let i=n[t];typeof i!="object"||i===null?c[t]=i:i.constructor!==Object&&(s=e.get(i.constructor))?c[t]=s(i,u):ArrayBuffer.isView(i)?c[t]=A(i):c[t]=u(i)}return c}function p(n){if(typeof n!="object"||n===null)return n;if(Array.isArray(n))return l(n,p);if(n.constructor!==Object&&(s=e.get(n.constructor)))return s(n,p);let c={};for(let t in n){let i=n[t];typeof i!="object"||i===null?c[t]=i:i.constructor!==Object&&(s=e.get(i.constructor))?c[t]=s(i,p):ArrayBuffer.isView(i)?c[t]=A(i):c[t]=p(i)}return c}}function W(r){let e=[],s=[],l=new Map;if(l.set(Date,t=>new Date(t)),l.set(Map,(t,i)=>new Map(p(Array.from(t),i))),l.set(Set,(t,i)=>new Set(p(Array.from(t),i))),r.constructorHandlers)for(let t of r.constructorHandlers)l.set(t[0],t[1]);let u=null;return r.proto?c:n;function p(t,i){let a=Object.keys(t),o=new Array(a.length);for(let f=0;f<a.length;f++){let y=a[f],h=t[y];if(typeof h!="object"||h===null)o[y]=h;else if(h.constructor!==Object&&(u=l.get(h.constructor)))o[y]=u(h,i);else if(ArrayBuffer.isView(h))o[y]=A(h);else{let $=e.indexOf(h);$!==-1?o[y]=s[$]:o[y]=i(h)}}return o}function n(t){if(typeof t!="object"||t===null)return t;if(Array.isArray(t))return p(t,n);if(t.constructor!==Object&&(u=l.get(t.constructor)))return u(t,n);let i={};e.push(t),s.push(i);for(let a in t){if(Object.hasOwnProperty.call(t,a)===!1)continue;let o=t[a];if(typeof o!="object"||o===null)i[a]=o;else if(o.constructor!==Object&&(u=l.get(o.constructor)))i[a]=u(o,n);else if(ArrayBuffer.isView(o))i[a]=A(o);else{let f=e.indexOf(o);f!==-1?i[a]=s[f]:i[a]=n(o)}}return e.pop(),s.pop(),i}function c(t){if(typeof t!="object"||t===null)return t;if(Array.isArray(t))return p(t,c);if(t.constructor!==Object&&(u=l.get(t.constructor)))return u(t,c);let i={};e.push(t),s.push(i);for(let a in t){let o=t[a];if(typeof o!="object"||o===null)i[a]=o;else if(o.constructor!==Object&&(u=l.get(o.constructor)))i[a]=u(o,c);else if(ArrayBuffer.isView(o))i[a]=A(o);else{let f=e.indexOf(o);f!==-1?i[a]=s[f]:i[a]=c(o)}}return e.pop(),s.pop(),i}}});var G={};K(G,{looseCompare:()=>z,version:()=>_});var O=j(b(),1);var N=j(b(),1);var ee=(0,N.default)();function m(r){if(r==null||typeof r!="object")return!1;let e=Object.getPrototypeOf(r);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null?!1:!(Symbol.iterator in r)&&!(Symbol.toStringTag in r)}function k(r){if(r.includes(".")){let e=r.lastIndexOf(".");if(!r.slice(0,e).includes("."))return r.slice(0,e);for(let s=e-1;s--;)if(r[s]===".")return r.slice(s+1,e)}return null}var v=(0,O.default)();function E(r,e){let s={now:!1};function l(u,p,n,c){let t=v(u),i,a=g({depth:-1,path:""},n);if(a.depth+=1,Array.isArray(t))for(let o=0,f=t.length;o<f&&!c.now;o++){let y=a.path?"".concat(a.path,".").concat(o):"".concat(o);t[o]!==void 0?(a.parent=v(t),a.parentType="array",a.parentKey=k(y),i=l(p(t[o],void 0,x(g({},a),{path:y}),c),p,x(g({},a),{path:y}),c),Number.isNaN(i)&&o<t.length?(t.splice(o,1),o-=1):t[o]=i):t.splice(o,1)}else if(m(t))for(let o in t){if(c.now&&o!=null)break;let f=a.path?"".concat(a.path,".").concat(o):o;a.depth===0&&o!=null&&(a.topmostKey=o),a.parent=v(t),a.parentType="object",a.parentKey=k(f),i=l(p(o,t[o],x(g({},a),{path:f}),c),p,x(g({},a),{path:f}),c),Number.isNaN(i)?delete t[o]:t[o]=i}return t}return l(r,e,{},s)}function d(r){if(typeof r=="string")return!r.trim();if(!["object","string"].includes(typeof r)||!r)return!1;let e=!0;return r=E(r,(s,l,u,p)=>{let n=l!==void 0?l:s;return typeof n=="string"&&n.trim()&&(e=!1,p.now=!0),n}),e}var I="4.0.30";var _=I;function C(r,e,s){function l(n){return n!=null}let u,p;if(s===void 0){if(!l(r)||!l(e))return}else if(!l(r)||!l(e))return!1;if(s=s||!0,typeof r!=typeof e)return!!(d(r)&&d(e));if(Array.isArray(r)&&Array.isArray(e))if(e.length){for(u=0,p=e.length;u<p;u++)if(Array.isArray(e[u])||m(e[u])){if(s=C(r[u],e[u],s),!s)return!1}else if(e[u]!==r[u])return!!(d(e[u])&&d(r[u]))}else return!!(e.length===0&&r.length===0||d(e)&&d(r));else if(m(r)&&m(e))if(Object.keys(e).length){let n=Object.keys(e);for(u=0,p=n.length;u<p;u++)if(Array.isArray(e[n[u]])||m(e[n[u]])||typeof e[n[u]]=="string"){if(s=C(r[n[u]],e[n[u]],s),!s)return!1}else if(e[n[u]]!==r[n[u]]&&(!d(e[n[u]])||!d(r[n[u]])))return!1}else return!!(Object.keys(e).length===0&&Object.keys(r).length===0||d(e)&&d(r));else if(typeof r=="string"&&typeof e=="string"){if(r!==e)return!!(d(e)&&d(r))}else return!!(d(e)&&d(r));return s}function z(r,e){return C(r,e)}return Q(G);})();
10
+ "use strict";var astLooseCompare=(()=>{var J=Object.create;var w=Object.defineProperty,P=Object.defineProperties,M=Object.getOwnPropertyDescriptor,T=Object.getOwnPropertyDescriptors,L=Object.getOwnPropertyNames,S=Object.getOwnPropertySymbols,R=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var V=(r,e,s)=>e in r?w(r,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[e]=s,g=(r,e)=>{for(var s in e||(e={}))B.call(e,s)&&V(r,s,e[s]);if(S)for(var s of S(e))F.call(e,s)&&V(r,s,e[s]);return r},x=(r,e)=>P(r,T(e));var H=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),K=(r,e)=>{for(var s in e)w(r,s,{get:e[s],enumerable:!0})},D=(r,e,s,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of L(e))!B.call(r,u)&&u!==s&&w(r,u,{get:()=>e[u],enumerable:!(l=M(e,u))||l.enumerable});return r};var j=(r,e,s)=>(s=r!=null?J(R(r)):{},D(e||!r||!r.__esModule?w(s,"default",{value:r,enumerable:!0}):s,r)),Q=r=>D(w({},"__esModule",{value:!0}),r);var b=H((Y,U)=>{"use strict";U.exports=q;function A(r){return r instanceof Buffer?Buffer.from(r):new r.constructor(r.buffer.slice(),r.byteOffset,r.length)}function q(r){if(r=r||{},r.circles)return W(r);let e=new Map;if(e.set(Date,n=>new Date(n)),e.set(Map,(n,c)=>new Map(l(Array.from(n),c))),e.set(Set,(n,c)=>new Set(l(Array.from(n),c))),r.constructorHandlers)for(let n of r.constructorHandlers)e.set(n[0],n[1]);let s=null;return r.proto?p:u;function l(n,c){let t=Object.keys(n),i=new Array(t.length);for(let a=0;a<t.length;a++){let o=t[a],f=n[o];typeof f!="object"||f===null?i[o]=f:f.constructor!==Object&&(s=e.get(f.constructor))?i[o]=s(f,c):ArrayBuffer.isView(f)?i[o]=A(f):i[o]=c(f)}return i}function u(n){if(typeof n!="object"||n===null)return n;if(Array.isArray(n))return l(n,u);if(n.constructor!==Object&&(s=e.get(n.constructor)))return s(n,u);let c={};for(let t in n){if(Object.hasOwnProperty.call(n,t)===!1)continue;let i=n[t];typeof i!="object"||i===null?c[t]=i:i.constructor!==Object&&(s=e.get(i.constructor))?c[t]=s(i,u):ArrayBuffer.isView(i)?c[t]=A(i):c[t]=u(i)}return c}function p(n){if(typeof n!="object"||n===null)return n;if(Array.isArray(n))return l(n,p);if(n.constructor!==Object&&(s=e.get(n.constructor)))return s(n,p);let c={};for(let t in n){let i=n[t];typeof i!="object"||i===null?c[t]=i:i.constructor!==Object&&(s=e.get(i.constructor))?c[t]=s(i,p):ArrayBuffer.isView(i)?c[t]=A(i):c[t]=p(i)}return c}}function W(r){let e=[],s=[],l=new Map;if(l.set(Date,t=>new Date(t)),l.set(Map,(t,i)=>new Map(p(Array.from(t),i))),l.set(Set,(t,i)=>new Set(p(Array.from(t),i))),r.constructorHandlers)for(let t of r.constructorHandlers)l.set(t[0],t[1]);let u=null;return r.proto?c:n;function p(t,i){let a=Object.keys(t),o=new Array(a.length);for(let f=0;f<a.length;f++){let y=a[f],h=t[y];if(typeof h!="object"||h===null)o[y]=h;else if(h.constructor!==Object&&(u=l.get(h.constructor)))o[y]=u(h,i);else if(ArrayBuffer.isView(h))o[y]=A(h);else{let $=e.indexOf(h);$!==-1?o[y]=s[$]:o[y]=i(h)}}return o}function n(t){if(typeof t!="object"||t===null)return t;if(Array.isArray(t))return p(t,n);if(t.constructor!==Object&&(u=l.get(t.constructor)))return u(t,n);let i={};e.push(t),s.push(i);for(let a in t){if(Object.hasOwnProperty.call(t,a)===!1)continue;let o=t[a];if(typeof o!="object"||o===null)i[a]=o;else if(o.constructor!==Object&&(u=l.get(o.constructor)))i[a]=u(o,n);else if(ArrayBuffer.isView(o))i[a]=A(o);else{let f=e.indexOf(o);f!==-1?i[a]=s[f]:i[a]=n(o)}}return e.pop(),s.pop(),i}function c(t){if(typeof t!="object"||t===null)return t;if(Array.isArray(t))return p(t,c);if(t.constructor!==Object&&(u=l.get(t.constructor)))return u(t,c);let i={};e.push(t),s.push(i);for(let a in t){let o=t[a];if(typeof o!="object"||o===null)i[a]=o;else if(o.constructor!==Object&&(u=l.get(o.constructor)))i[a]=u(o,c);else if(ArrayBuffer.isView(o))i[a]=A(o);else{let f=e.indexOf(o);f!==-1?i[a]=s[f]:i[a]=c(o)}}return e.pop(),s.pop(),i}}});var G={};K(G,{looseCompare:()=>z,version:()=>_});var O=j(b(),1);var N=j(b(),1);var ee=(0,N.default)();function m(r){if(r==null||typeof r!="object")return!1;let e=Object.getPrototypeOf(r);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null?!1:!(Symbol.iterator in r)&&!(Symbol.toStringTag in r)}function k(r){if(r.includes(".")){let e=r.lastIndexOf(".");if(!r.slice(0,e).includes("."))return r.slice(0,e);for(let s=e-1;s--;)if(r[s]===".")return r.slice(s+1,e)}return null}var v=(0,O.default)();function E(r,e){let s={now:!1};function l(u,p,n,c){let t=v(u),i,a=g({depth:-1,path:""},n);if(a.depth+=1,Array.isArray(t))for(let o=0,f=t.length;o<f&&!c.now;o++){let y=a.path?"".concat(a.path,".").concat(o):"".concat(o);t[o]!==void 0?(a.parent=v(t),a.parentType="array",a.parentKey=k(y),i=l(p(t[o],void 0,x(g({},a),{path:y}),c),p,x(g({},a),{path:y}),c),Number.isNaN(i)&&o<t.length?(t.splice(o,1),o-=1):t[o]=i):t.splice(o,1)}else if(m(t))for(let o in t){if(c.now&&o!=null)break;let f=a.path?"".concat(a.path,".").concat(o):o;a.depth===0&&o!=null&&(a.topmostKey=o),a.parent=v(t),a.parentType="object",a.parentKey=k(f),i=l(p(o,t[o],x(g({},a),{path:f}),c),p,x(g({},a),{path:f}),c),Number.isNaN(i)?delete t[o]:t[o]=i}return t}return l(r,e,{},s)}function d(r){if(typeof r=="string")return!r.trim();if(!["object","string"].includes(typeof r)||!r)return!1;let e=!0;return r=E(r,(s,l,u,p)=>{let n=l!==void 0?l:s;return typeof n=="string"&&n.trim()&&(e=!1,p.now=!0),n}),e}var I="4.1.0";var _=I;function C(r,e,s){function l(n){return n!=null}let u,p;if(s===void 0){if(!l(r)||!l(e))return}else if(!l(r)||!l(e))return!1;if(s=s||!0,typeof r!=typeof e)return!!(d(r)&&d(e));if(Array.isArray(r)&&Array.isArray(e))if(e.length){for(u=0,p=e.length;u<p;u++)if(Array.isArray(e[u])||m(e[u])){if(s=C(r[u],e[u],s),!s)return!1}else if(e[u]!==r[u])return!!(d(e[u])&&d(r[u]))}else return!!(e.length===0&&r.length===0||d(e)&&d(r));else if(m(r)&&m(e))if(Object.keys(e).length){let n=Object.keys(e);for(u=0,p=n.length;u<p;u++)if(Array.isArray(e[n[u]])||m(e[n[u]])||typeof e[n[u]]=="string"){if(s=C(r[n[u]],e[n[u]],s),!s)return!1}else if(e[n[u]]!==r[n[u]]&&(!d(e[n[u]])||!d(r[n[u]])))return!1}else return!!(Object.keys(e).length===0&&Object.keys(r).length===0||d(e)&&d(r));else if(typeof r=="string"&&typeof e=="string"){if(r!==e)return!!(d(e)&&d(r))}else return!!(d(e)&&d(r));return s}function z(r,e){return C(r,e)}return Q(G);})();
11
11
  /**
12
12
  * @name codsen-utils
13
13
  * @fileoverview Various utility functions
14
- * @version 1.6.18
15
- * @author Roy Revelt, Codsen Ltd
14
+ * @version 1.7.0
15
+ * @author Roy Revelt
16
16
  * @license MIT
17
17
  * {@link https://codsen.com/os/codsen-utils/}
18
18
  */
19
19
  /**
20
20
  * @name ast-monkey-util
21
21
  * @fileoverview Utility library of AST helper functions
22
- * @version 3.0.20
23
- * @author Roy Revelt, Codsen Ltd
22
+ * @version 3.1.0
23
+ * @author Roy Revelt
24
24
  * @license MIT
25
25
  * {@link https://codsen.com/os/ast-monkey-util/}
26
26
  */
27
27
  /**
28
28
  * @name ast-monkey-traverse
29
29
  * @fileoverview Utility library to traverse AST
30
- * @version 4.0.30
31
- * @author Roy Revelt, Codsen Ltd
30
+ * @version 4.1.0
31
+ * @author Roy Revelt
32
32
  * @license MIT
33
33
  * {@link https://codsen.com/os/ast-monkey-traverse/}
34
34
  */
35
35
  /**
36
36
  * @name ast-contains-only-empty-space
37
37
  * @fileoverview Does AST contain only empty space?
38
- * @version 4.0.30
39
- * @author Roy Revelt, Codsen Ltd
38
+ * @version 4.1.0
39
+ * @author Roy Revelt
40
40
  * @license MIT
41
41
  * {@link https://codsen.com/os/ast-contains-only-empty-space/}
42
42
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ast-loose-compare",
3
- "version": "4.0.30",
3
+ "version": "4.1.0",
4
4
  "description": "Compare anything: AST, objects, arrays and strings",
5
5
  "keywords": [
6
6
  "array",
@@ -52,7 +52,7 @@
52
52
  "examples": "node '../../ops/scripts/run-examples.js'",
53
53
  "lect": "node '../../ops/lect/lect.js' && npm run prettier -- 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
54
54
  "letspublish": "npm publish --provenance || :",
55
- "lint": "eslint . --fix",
55
+ "lint": "eslint . --fix --concurrency=auto --cache",
56
56
  "perf": "node perf/check.js",
57
57
  "prep": "echo 'ready'",
58
58
  "prettier": "prettier",
@@ -79,8 +79,8 @@
79
79
  }
80
80
  },
81
81
  "dependencies": {
82
- "ast-contains-only-empty-space": "^4.0.30",
83
- "codsen-utils": "^1.6.18"
82
+ "ast-contains-only-empty-space": "^4.1.0",
83
+ "codsen-utils": "^1.7.0"
84
84
  },
85
85
  "publishConfig": {
86
86
  "registry": "https://registry.npmjs.org/"