Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ast-contains-only-empty-space

Package Overview
Dependencies
Maintainers
1
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ast-contains-only-empty-space - npm Package Compare versions

Comparing version 4.0.10 to 4.0.11

4

dist/ast-contains-only-empty-space.esm.js
/**
* @name ast-contains-only-empty-space
* @fileoverview Does AST contain only empty space?
* @version 4.0.10
* @version 4.0.11
* @author Roy Revelt, Codsen Ltd

@@ -10,2 +10,2 @@ * @license MIT

import{traverse as p}from"ast-monkey-traverse";var o="4.0.10";var d=o;function y(e){if(typeof e=="string")return!e.trim();if(!["object","string"].includes(typeof e)||!e)return!1;let n=!0;return e=p(e,(r,s,c,i)=>{let t=s!==void 0?s:r;return typeof t=="string"&&t.trim()&&(n=!1,i.now=!0),t}),n}export{y as empty,d as version};
import{traverse as p}from"ast-monkey-traverse";var o="4.0.11";var d=o;function y(e){if(typeof e=="string")return!e.trim();if(!["object","string"].includes(typeof e)||!e)return!1;let n=!0;return e=p(e,(r,s,c,i)=>{let t=s!==void 0?s:r;return typeof t=="string"&&t.trim()&&(n=!1,i.now=!0),t}),n}export{y as empty,d as version};
/**
* @name ast-contains-only-empty-space
* @fileoverview Does AST contain only empty space?
* @version 4.0.10
* @version 4.0.11
* @author Roy Revelt, Codsen Ltd

@@ -10,7 +10,7 @@ * @license MIT

"use strict";var astContainsOnlyEmptySpace=(()=>{var E=Object.create;var h=Object.defineProperty,M=Object.defineProperties,N=Object.getOwnPropertyDescriptor,V=Object.getOwnPropertyDescriptors,P=Object.getOwnPropertyNames,A=Object.getOwnPropertySymbols,T=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var w=(e,n,a)=>n in e?h(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a,y=(e,n)=>{for(var a in n||(n={}))D.call(n,a)&&w(e,a,n[a]);if(A)for(var a of A(n))L.call(n,a)&&w(e,a,n[a]);return e},b=(e,n)=>M(e,V(n));var F=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),I=(e,n)=>{for(var a in n)h(e,a,{get:n[a],enumerable:!0})},$=(e,n,a,u)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of P(n))!D.call(e,s)&&s!==a&&h(e,s,{get:()=>n[s],enumerable:!(u=N(n,s))||u.enumerable});return e};var R=(e,n,a)=>(a=e!=null?E(T(e)):{},$(n||!e||!e.__esModule?h(a,"default",{value:e,enumerable:!0}):a,e)),Q=e=>$(h({},"__esModule",{value:!0}),e);var S=F((H,x)=>{"use strict";x.exports=U;function d(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function U(e){if(e=e||{},e.circles)return K(e);return e.proto?u:a;function n(s,f){for(var t=Object.keys(s),r=new Array(t.length),o=0;o<t.length;o++){var i=t[o],l=s[i];typeof l!="object"||l===null?r[i]=l:l instanceof Date?r[i]=new Date(l):ArrayBuffer.isView(l)?r[i]=d(l):r[i]=f(l)}return r}function a(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return n(s,a);if(s instanceof Map)return new Map(n(Array.from(s),a));if(s instanceof Set)return new Set(n(Array.from(s),a));var f={};for(var t in s)if(Object.hasOwnProperty.call(s,t)!==!1){var r=s[t];typeof r!="object"||r===null?f[t]=r:r instanceof Date?f[t]=new Date(r):r instanceof Map?f[t]=new Map(n(Array.from(r),a)):r instanceof Set?f[t]=new Set(n(Array.from(r),a)):ArrayBuffer.isView(r)?f[t]=d(r):f[t]=a(r)}return f}function u(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return n(s,u);if(s instanceof Map)return new Map(n(Array.from(s),u));if(s instanceof Set)return new Set(n(Array.from(s),u));var f={};for(var t in s){var r=s[t];typeof r!="object"||r===null?f[t]=r:r instanceof Date?f[t]=new Date(r):r instanceof Map?f[t]=new Map(n(Array.from(r),u)):r instanceof Set?f[t]=new Set(n(Array.from(r),u)):ArrayBuffer.isView(r)?f[t]=d(r):f[t]=u(r)}return f}}function K(e){var n=[],a=[];return e.proto?f:s;function u(t,r){for(var o=Object.keys(t),i=new Array(o.length),l=0;l<o.length;l++){var p=o[l],c=t[p];if(typeof c!="object"||c===null)i[p]=c;else if(c instanceof Date)i[p]=new Date(c);else if(ArrayBuffer.isView(c))i[p]=d(c);else{var m=n.indexOf(c);m!==-1?i[p]=a[m]:i[p]=r(c)}}return i}function s(t){if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t);if(Array.isArray(t))return u(t,s);if(t instanceof Map)return new Map(u(Array.from(t),s));if(t instanceof Set)return new Set(u(Array.from(t),s));var r={};n.push(t),a.push(r);for(var o in t)if(Object.hasOwnProperty.call(t,o)!==!1){var i=t[o];if(typeof i!="object"||i===null)r[o]=i;else if(i instanceof Date)r[o]=new Date(i);else if(i instanceof Map)r[o]=new Map(u(Array.from(i),s));else if(i instanceof Set)r[o]=new Set(u(Array.from(i),s));else if(ArrayBuffer.isView(i))r[o]=d(i);else{var l=n.indexOf(i);l!==-1?r[o]=a[l]:r[o]=s(i)}}return n.pop(),a.pop(),r}function f(t){if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t);if(Array.isArray(t))return u(t,f);if(t instanceof Map)return new Map(u(Array.from(t),f));if(t instanceof Set)return new Set(u(Array.from(t),f));var r={};n.push(t),a.push(r);for(var o in t){var i=t[o];if(typeof i!="object"||i===null)r[o]=i;else if(i instanceof Date)r[o]=new Date(i);else if(i instanceof Map)r[o]=new Map(u(Array.from(i),f));else if(i instanceof Set)r[o]=new Set(u(Array.from(i),f));else if(ArrayBuffer.isView(i))r[o]=d(i);else{var l=n.indexOf(i);l!==-1?r[o]=a[l]:r[o]=f(i)}}return n.pop(),a.pop(),r}}});var Z={};I(Z,{empty:()=>W,version:()=>z});var O=R(S(),1);function j(e){if(e==null||typeof e!="object")return!1;let n=Object.getPrototypeOf(e);return n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function J(e){if(e.includes(".")){let n=e.lastIndexOf(".");if(!e.slice(0,n).includes("."))return e.slice(0,n);for(let a=n-1;a--;)if(e[a]===".")return e.slice(a+1,n)}return null}var g=J;var v=(0,O.default)();function C(e,n){let a={now:!1};function u(s,f,t,r){let o=v(s),i,l=y({depth:-1,path:""},t);if(l.depth+=1,Array.isArray(o))for(let p=0,c=o.length;p<c&&!r.now;p++){let m=l.path?`${l.path}.${p}`:`${p}`;o[p]!==void 0?(l.parent=v(o),l.parentType="array",l.parentKey=g(m),i=u(f(o[p],void 0,b(y({},l),{path:m}),r),f,b(y({},l),{path:m}),r),Number.isNaN(i)&&p<o.length?(o.splice(p,1),p-=1):o[p]=i):o.splice(p,1)}else if(j(o))for(let p in o){if(r.now&&p!=null)break;let c=l.path?`${l.path}.${p}`:p;l.depth===0&&p!=null&&(l.topmostKey=p),l.parent=v(o),l.parentType="object",l.parentKey=g(c),i=u(f(p,o[p],b(y({},l),{path:c}),r),f,b(y({},l),{path:c}),r),Number.isNaN(i)?delete o[p]:o[p]=i}return o}return u(e,n,{},a)}var B="4.0.10";var z=B;function W(e){if(typeof e=="string")return!e.trim();if(!["object","string"].includes(typeof e)||!e)return!1;let n=!0;return e=C(e,(a,u,s,f)=>{let t=u!==void 0?u:a;return typeof t=="string"&&t.trim()&&(n=!1,f.now=!0),t}),n}return Q(Z);})();
"use strict";var astContainsOnlyEmptySpace=(()=>{var N=Object.create;var b=Object.defineProperty,V=Object.defineProperties,I=Object.getOwnPropertyDescriptor,T=Object.getOwnPropertyDescriptors,P=Object.getOwnPropertyNames,w=Object.getOwnPropertySymbols,L=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var D=(e,n,a)=>n in e?b(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a,y=(e,n)=>{for(var a in n||(n={}))$.call(n,a)&&D(e,a,n[a]);if(w)for(var a of w(n))R.call(n,a)&&D(e,a,n[a]);return e},h=(e,n)=>V(e,T(n));var F=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),Q=(e,n)=>{for(var a in n)b(e,a,{get:n[a],enumerable:!0})},S=(e,n,a,u)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of P(n))!$.call(e,s)&&s!==a&&b(e,s,{get:()=>n[s],enumerable:!(u=I(n,s))||u.enumerable});return e};var x=(e,n,a)=>(a=e!=null?N(L(e)):{},S(n||!e||!e.__esModule?b(a,"default",{value:e,enumerable:!0}):a,e)),U=e=>S(b({},"__esModule",{value:!0}),e);var g=F((G,j)=>{"use strict";j.exports=J;function d(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function J(e){if(e=e||{},e.circles)return K(e);return e.proto?u:a;function n(s,f){for(var t=Object.keys(s),r=new Array(t.length),o=0;o<t.length;o++){var i=t[o],l=s[i];typeof l!="object"||l===null?r[i]=l:l instanceof Date?r[i]=new Date(l):ArrayBuffer.isView(l)?r[i]=d(l):r[i]=f(l)}return r}function a(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return n(s,a);if(s instanceof Map)return new Map(n(Array.from(s),a));if(s instanceof Set)return new Set(n(Array.from(s),a));var f={};for(var t in s)if(Object.hasOwnProperty.call(s,t)!==!1){var r=s[t];typeof r!="object"||r===null?f[t]=r:r instanceof Date?f[t]=new Date(r):r instanceof Map?f[t]=new Map(n(Array.from(r),a)):r instanceof Set?f[t]=new Set(n(Array.from(r),a)):ArrayBuffer.isView(r)?f[t]=d(r):f[t]=a(r)}return f}function u(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return n(s,u);if(s instanceof Map)return new Map(n(Array.from(s),u));if(s instanceof Set)return new Set(n(Array.from(s),u));var f={};for(var t in s){var r=s[t];typeof r!="object"||r===null?f[t]=r:r instanceof Date?f[t]=new Date(r):r instanceof Map?f[t]=new Map(n(Array.from(r),u)):r instanceof Set?f[t]=new Set(n(Array.from(r),u)):ArrayBuffer.isView(r)?f[t]=d(r):f[t]=u(r)}return f}}function K(e){var n=[],a=[];return e.proto?f:s;function u(t,r){for(var o=Object.keys(t),i=new Array(o.length),l=0;l<o.length;l++){var p=o[l],c=t[p];if(typeof c!="object"||c===null)i[p]=c;else if(c instanceof Date)i[p]=new Date(c);else if(ArrayBuffer.isView(c))i[p]=d(c);else{var m=n.indexOf(c);m!==-1?i[p]=a[m]:i[p]=r(c)}}return i}function s(t){if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t);if(Array.isArray(t))return u(t,s);if(t instanceof Map)return new Map(u(Array.from(t),s));if(t instanceof Set)return new Set(u(Array.from(t),s));var r={};n.push(t),a.push(r);for(var o in t)if(Object.hasOwnProperty.call(t,o)!==!1){var i=t[o];if(typeof i!="object"||i===null)r[o]=i;else if(i instanceof Date)r[o]=new Date(i);else if(i instanceof Map)r[o]=new Map(u(Array.from(i),s));else if(i instanceof Set)r[o]=new Set(u(Array.from(i),s));else if(ArrayBuffer.isView(i))r[o]=d(i);else{var l=n.indexOf(i);l!==-1?r[o]=a[l]:r[o]=s(i)}}return n.pop(),a.pop(),r}function f(t){if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t);if(Array.isArray(t))return u(t,f);if(t instanceof Map)return new Map(u(Array.from(t),f));if(t instanceof Set)return new Set(u(Array.from(t),f));var r={};n.push(t),a.push(r);for(var o in t){var i=t[o];if(typeof i!="object"||i===null)r[o]=i;else if(i instanceof Date)r[o]=new Date(i);else if(i instanceof Map)r[o]=new Map(u(Array.from(i),f));else if(i instanceof Set)r[o]=new Set(u(Array.from(i),f));else if(ArrayBuffer.isView(i))r[o]=d(i);else{var l=n.indexOf(i);l!==-1?r[o]=a[l]:r[o]=f(i)}}return n.pop(),a.pop(),r}}});var Z={};Q(Z,{empty:()=>H,version:()=>z});var E=x(g(),1);var O=x(g(),1);var X=(0,O.default)();function C(e){if(e==null||typeof e!="object")return!1;let n=Object.getPrototypeOf(e);return n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function W(e){if(e.includes(".")){let n=e.lastIndexOf(".");if(!e.slice(0,n).includes("."))return e.slice(0,n);for(let a=n-1;a--;)if(e[a]===".")return e.slice(a+1,n)}return null}var A=W;var v=(0,E.default)();function B(e,n){let a={now:!1};function u(s,f,t,r){let o=v(s),i,l=y({depth:-1,path:""},t);if(l.depth+=1,Array.isArray(o))for(let p=0,c=o.length;p<c&&!r.now;p++){let m=l.path?`${l.path}.${p}`:`${p}`;o[p]!==void 0?(l.parent=v(o),l.parentType="array",l.parentKey=A(m),i=u(f(o[p],void 0,h(y({},l),{path:m}),r),f,h(y({},l),{path:m}),r),Number.isNaN(i)&&p<o.length?(o.splice(p,1),p-=1):o[p]=i):o.splice(p,1)}else if(C(o))for(let p in o){if(r.now&&p!=null)break;let c=l.path?`${l.path}.${p}`:p;l.depth===0&&p!=null&&(l.topmostKey=p),l.parent=v(o),l.parentType="object",l.parentKey=A(c),i=u(f(p,o[p],h(y({},l),{path:c}),r),f,h(y({},l),{path:c}),r),Number.isNaN(i)?delete o[p]:o[p]=i}return o}return u(e,n,{},a)}var M="4.0.11";var z=M;function H(e){if(typeof e=="string")return!e.trim();if(!["object","string"].includes(typeof e)||!e)return!1;let n=!0;return e=B(e,(a,u,s,f)=>{let t=u!==void 0?u:a;return typeof t=="string"&&t.trim()&&(n=!1,f.now=!0),t}),n}return U(Z);})();
/**
* @name codsen-utils
* @fileoverview Various utility functions
* @version 1.5.0
* @version 1.6.0
* @author Roy Revelt, Codsen Ltd

@@ -31,3 +31,3 @@ * @license MIT

* @fileoverview Utility library to traverse AST
* @version 4.0.10
* @version 4.0.11
* @author Roy Revelt, Codsen Ltd

@@ -34,0 +34,0 @@ * @license MIT

{
"name": "ast-contains-only-empty-space",
"version": "4.0.10",
"version": "4.0.11",
"description": "Does AST contain only empty space?",

@@ -77,4 +77,4 @@ "keywords": [

"dependencies": {
"ast-monkey-traverse": "^4.0.10"
"ast-monkey-traverse": "^4.0.11"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc