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.8 to 4.0.9

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.8
* @version 4.0.9
* @author Roy Revelt, Codsen Ltd

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

import{traverse as p}from"ast-monkey-traverse";var o="4.0.8";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.9";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.8
* @version 4.0.9
* @author Roy Revelt, Codsen Ltd

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

"use strict";var astContainsOnlyEmptySpace=(()=>{var zt=Object.create;var S=Object.defineProperty,Xt=Object.defineProperties,Yt=Object.getOwnPropertyDescriptor,te=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertyNames,rt=Object.getOwnPropertySymbols,re=Object.getPrototypeOf,at=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var nt=(t,e,r)=>e in t?S(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,A=(t,e)=>{for(var r in e||(e={}))at.call(e,r)&&nt(t,r,e[r]);if(rt)for(var r of rt(e))ne.call(e,r)&&nt(t,r,e[r]);return t},$=(t,e)=>Xt(t,te(e));var ae=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),oe=(t,e)=>{for(var r in e)S(t,r,{get:e[r],enumerable:!0})},ot=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of ee(e))!at.call(t,a)&&a!==r&&S(t,a,{get:()=>e[a],enumerable:!(n=Yt(e,a))||n.enumerable});return t};var ie=(t,e,r)=>(r=t!=null?zt(re(t)):{},ot(e||!t||!t.__esModule?S(r,"default",{value:t,enumerable:!0}):r,t)),se=t=>ot(S({},"__esModule",{value:!0}),t);var Wt=ae((j,w)=>{var ue=200,yt="__lodash_hash_undefined__",mt=9007199254740991,J="[object Arguments]",ce="[object Array]",_t="[object Boolean]",vt="[object Date]",le="[object Error]",q="[object Function]",At="[object GeneratorFunction]",I="[object Map]",wt="[object Number]",Z="[object Object]",it="[object Promise]",xt="[object RegExp]",P="[object Set]",Ct="[object String]",Ot="[object Symbol]",k="[object WeakMap]",St="[object ArrayBuffer]",B="[object DataView]",$t="[object Float32Array]",jt="[object Float64Array]",Tt="[object Int8Array]",Et="[object Int16Array]",Dt="[object Int32Array]",It="[object Uint8Array]",Pt="[object Uint8ClampedArray]",Bt="[object Uint16Array]",Nt="[object Uint32Array]",fe=/[\\^$.*+?()[\]{}|]/g,pe=/\w*$/,de=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,o={};o[J]=o[ce]=o[St]=o[B]=o[_t]=o[vt]=o[$t]=o[jt]=o[Tt]=o[Et]=o[Dt]=o[I]=o[wt]=o[Z]=o[xt]=o[P]=o[Ct]=o[Ot]=o[It]=o[Pt]=o[Bt]=o[Nt]=!0;o[le]=o[q]=o[k]=!1;var ge=typeof global=="object"&&global&&global.Object===Object&&global,be=typeof self=="object"&&self&&self.Object===Object&&self,d=ge||be||Function("return this")(),Mt=typeof j=="object"&&j&&!j.nodeType&&j,st=Mt&&typeof w=="object"&&w&&!w.nodeType&&w,ye=st&&st.exports===Mt;function me(t,e){return t.set(e[0],e[1]),t}function _e(t,e){return t.add(e),t}function ve(t,e){for(var r=-1,n=t?t.length:0;++r<n&&e(t[r],r,t)!==!1;);return t}function Ae(t,e){for(var r=-1,n=e.length,a=t.length;++r<n;)t[a+r]=e[r];return t}function Lt(t,e,r,n){var a=-1,s=t?t.length:0;for(n&&s&&(r=t[++a]);++a<s;)r=e(r,t[a],a,t);return r}function we(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function xe(t,e){return t==null?void 0:t[e]}function Rt(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function ut(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}function z(t,e){return function(r){return t(e(r))}}function ct(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Ce=Array.prototype,Oe=Function.prototype,N=Object.prototype,U=d["__core-js_shared__"],lt=function(){var t=/[^.]+$/.exec(U&&U.keys&&U.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ft=Oe.toString,b=N.hasOwnProperty,M=N.toString,Se=RegExp("^"+Ft.call(b).replace(fe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ft=ye?d.Buffer:void 0,pt=d.Symbol,dt=d.Uint8Array,$e=z(Object.getPrototypeOf,Object),je=Object.create,Te=N.propertyIsEnumerable,Ee=Ce.splice,ht=Object.getOwnPropertySymbols,De=ft?ft.isBuffer:void 0,Ie=z(Object.keys,Object),G=O(d,"DataView"),T=O(d,"Map"),K=O(d,"Promise"),H=O(d,"Set"),Q=O(d,"WeakMap"),E=O(Object,"create"),Pe=v(G),Be=v(T),Ne=v(K),Me=v(H),Le=v(Q),gt=pt?pt.prototype:void 0,bt=gt?gt.valueOf:void 0;function _(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Re(){this.__data__=E?E(null):{}}function Fe(t){return this.has(t)&&delete this.__data__[t]}function Ve(t){var e=this.__data__;if(E){var r=e[t];return r===yt?void 0:r}return b.call(e,t)?e[t]:void 0}function Ue(t){var e=this.__data__;return E?e[t]!==void 0:b.call(e,t)}function ke(t,e){var r=this.__data__;return r[t]=E&&e===void 0?yt:e,this}_.prototype.clear=Re;_.prototype.delete=Fe;_.prototype.get=Ve;_.prototype.has=Ue;_.prototype.set=ke;function h(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Ge(){this.__data__=[]}function Ke(t){var e=this.__data__,r=L(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Ee.call(e,r,1),!0}function He(t){var e=this.__data__,r=L(e,t);return r<0?void 0:e[r][1]}function Qe(t){return L(this.__data__,t)>-1}function We(t,e){var r=this.__data__,n=L(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}h.prototype.clear=Ge;h.prototype.delete=Ke;h.prototype.get=He;h.prototype.has=Qe;h.prototype.set=We;function x(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Je(){this.__data__={hash:new _,map:new(T||h),string:new _}}function qe(t){return R(this,t).delete(t)}function Ze(t){return R(this,t).get(t)}function ze(t){return R(this,t).has(t)}function Xe(t,e){return R(this,t).set(t,e),this}x.prototype.clear=Je;x.prototype.delete=qe;x.prototype.get=Ze;x.prototype.has=ze;x.prototype.set=Xe;function C(t){this.__data__=new h(t)}function Ye(){this.__data__=new h}function tr(t){return this.__data__.delete(t)}function er(t){return this.__data__.get(t)}function rr(t){return this.__data__.has(t)}function nr(t,e){var r=this.__data__;if(r instanceof h){var n=r.__data__;if(!T||n.length<ue-1)return n.push([t,e]),this;r=this.__data__=new x(n)}return r.set(t,e),this}C.prototype.clear=Ye;C.prototype.delete=tr;C.prototype.get=er;C.prototype.has=rr;C.prototype.set=nr;function ar(t,e){var r=Y(t)||jr(t)?we(t.length,String):[],n=r.length,a=!!n;for(var s in t)(e||b.call(t,s))&&!(a&&(s=="length"||Cr(s,n)))&&r.push(s);return r}function Vt(t,e,r){var n=t[e];(!(b.call(t,e)&&Kt(n,r))||r===void 0&&!(e in t))&&(t[e]=r)}function L(t,e){for(var r=t.length;r--;)if(Kt(t[r][0],e))return r;return-1}function or(t,e){return t&&Ut(e,tt(e),t)}function W(t,e,r,n,a,s,f){var u;if(n&&(u=s?n(t,a,s,f):n(t)),u!==void 0)return u;if(!F(t))return t;var l=Y(t);if(l){if(u=Ar(t),!e)return mr(t,u)}else{var p=m(t),c=p==q||p==At;if(Er(t))return fr(t,e);if(p==Z||p==J||c&&!s){if(Rt(t))return s?t:{};if(u=wr(c?{}:t),!e)return _r(t,or(u,t))}else{if(!o[p])return s?t:{};u=xr(t,p,W,e)}}f||(f=new C);var i=f.get(t);if(i)return i;if(f.set(t,u),!l)var g=r?vr(t):tt(t);return ve(g||t,function(y,D){g&&(D=y,y=t[D]),Vt(u,D,W(y,e,r,n,D,t,f))}),u}function ir(t){return F(t)?je(t):{}}function sr(t,e,r){var n=e(t);return Y(t)?n:Ae(n,r(t))}function ur(t){return M.call(t)}function cr(t){if(!F(t)||Sr(t))return!1;var e=Qt(t)||Rt(t)?Se:de;return e.test(v(t))}function lr(t){if(!Gt(t))return Ie(t);var e=[];for(var r in Object(t))b.call(t,r)&&r!="constructor"&&e.push(r);return e}function fr(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function X(t){var e=new t.constructor(t.byteLength);return new dt(e).set(new dt(t)),e}function pr(t,e){var r=e?X(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function dr(t,e,r){var n=e?r(ut(t),!0):ut(t);return Lt(n,me,new t.constructor)}function hr(t){var e=new t.constructor(t.source,pe.exec(t));return e.lastIndex=t.lastIndex,e}function gr(t,e,r){var n=e?r(ct(t),!0):ct(t);return Lt(n,_e,new t.constructor)}function br(t){return bt?Object(bt.call(t)):{}}function yr(t,e){var r=e?X(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function mr(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function Ut(t,e,r,n){r||(r={});for(var a=-1,s=e.length;++a<s;){var f=e[a],u=n?n(r[f],t[f],f,r,t):void 0;Vt(r,f,u===void 0?t[f]:u)}return r}function _r(t,e){return Ut(t,kt(t),e)}function vr(t){return sr(t,tt,kt)}function R(t,e){var r=t.__data__;return Or(e)?r[typeof e=="string"?"string":"hash"]:r.map}function O(t,e){var r=xe(t,e);return cr(r)?r:void 0}var kt=ht?z(ht,Object):Pr,m=ur;(G&&m(new G(new ArrayBuffer(1)))!=B||T&&m(new T)!=I||K&&m(K.resolve())!=it||H&&m(new H)!=P||Q&&m(new Q)!=k)&&(m=function(t){var e=M.call(t),r=e==Z?t.constructor:void 0,n=r?v(r):void 0;if(n)switch(n){case Pe:return B;case Be:return I;case Ne:return it;case Me:return P;case Le:return k}return e});function Ar(t){var e=t.length,r=t.constructor(e);return e&&typeof t[0]=="string"&&b.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function wr(t){return typeof t.constructor=="function"&&!Gt(t)?ir($e(t)):{}}function xr(t,e,r,n){var a=t.constructor;switch(e){case St:return X(t);case _t:case vt:return new a(+t);case B:return pr(t,n);case $t:case jt:case Tt:case Et:case Dt:case It:case Pt:case Bt:case Nt:return yr(t,n);case I:return dr(t,n,r);case wt:case Ct:return new a(t);case xt:return hr(t);case P:return gr(t,n,r);case Ot:return br(t)}}function Cr(t,e){return e=e==null?mt:e,!!e&&(typeof t=="number"||he.test(t))&&t>-1&&t%1==0&&t<e}function Or(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Sr(t){return!!lt&&lt in t}function Gt(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||N;return t===r}function v(t){if(t!=null){try{return Ft.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function $r(t){return W(t,!0,!0)}function Kt(t,e){return t===e||t!==t&&e!==e}function jr(t){return Tr(t)&&b.call(t,"callee")&&(!Te.call(t,"callee")||M.call(t)==J)}var Y=Array.isArray;function Ht(t){return t!=null&&Dr(t.length)&&!Qt(t)}function Tr(t){return Ir(t)&&Ht(t)}var Er=De||Br;function Qt(t){var e=F(t)?M.call(t):"";return e==q||e==At}function Dr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=mt}function F(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Ir(t){return!!t&&typeof t=="object"}function tt(t){return Ht(t)?ar(t):lr(t)}function Pr(){return[]}function Br(){return!1}w.exports=$r});var Fr={};oe(Fr,{empty:()=>Rr,version:()=>Lr});var V=ie(Wt(),1);function Jt(t){if(t==null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null?!1:!(Symbol.iterator in t)&&!(Symbol.toStringTag in t)}function Nr(t){if(t.includes(".")){let e=t.lastIndexOf(".");if(!t.slice(0,e).includes("."))return t.slice(0,e);for(let r=e-1;r--;)if(t[r]===".")return t.slice(r+1,e)}return null}var et=Nr;function qt(t,e){let r={now:!1};function n(a,s,f,u){let l=(0,V.default)(a),p,c=A({depth:-1,path:""},f);if(c.depth+=1,Array.isArray(l))for(let i=0,g=l.length;i<g&&!u.now;i++){let y=c.path?`${c.path}.${i}`:`${i}`;l[i]!==void 0?(c.parent=(0,V.default)(l),c.parentType="array",c.parentKey=et(y),p=n(s(l[i],void 0,$(A({},c),{path:y}),u),s,$(A({},c),{path:y}),u),Number.isNaN(p)&&i<l.length?(l.splice(i,1),i-=1):l[i]=p):l.splice(i,1)}else if(Jt(l))for(let i in l){if(u.now&&i!=null)break;let g=c.path?`${c.path}.${i}`:i;c.depth===0&&i!=null&&(c.topmostKey=i),c.parent=(0,V.default)(l),c.parentType="object",c.parentKey=et(g),p=n(s(i,l[i],$(A({},c),{path:g}),u),s,$(A({},c),{path:g}),u),Number.isNaN(p)?delete l[i]:l[i]=p}return l}return n(t,e,{},r)}var Zt="4.0.8";var Lr=Zt;function Rr(t){if(typeof t=="string")return!t.trim();if(!["object","string"].includes(typeof t)||!t)return!1;let e=!0;return t=qt(t,(r,n,a,s)=>{let f=n!==void 0?n:r;return typeof f=="string"&&f.trim()&&(e=!1,s.now=!0),f}),e}return se(Fr);})();
"use strict";var astContainsOnlyEmptySpace=(()=>{var Xt=Object.create;var O=Object.defineProperty,Yt=Object.defineProperties,zt=Object.getOwnPropertyDescriptor,te=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertyNames,rt=Object.getOwnPropertySymbols,re=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var nt=(t,e,r)=>e in t?O(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,A=(t,e)=>{for(var r in e||(e={}))ot.call(e,r)&&nt(t,r,e[r]);if(rt)for(var r of rt(e))ne.call(e,r)&&nt(t,r,e[r]);return t},$=(t,e)=>Yt(t,te(e));var oe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ie=(t,e)=>{for(var r in e)O(t,r,{get:e[r],enumerable:!0})},it=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ee(e))!ot.call(t,o)&&o!==r&&O(t,o,{get:()=>e[o],enumerable:!(n=zt(e,o))||n.enumerable});return t};var ae=(t,e,r)=>(r=t!=null?Xt(re(t)):{},it(e||!t||!t.__esModule?O(r,"default",{value:t,enumerable:!0}):r,t)),se=t=>it(O({},"__esModule",{value:!0}),t);var Jt=oe((j,w)=>{var ue=200,yt="__lodash_hash_undefined__",mt=9007199254740991,W="[object Arguments]",ce="[object Array]",_t="[object Boolean]",vt="[object Date]",le="[object Error]",q="[object Function]",At="[object GeneratorFunction]",I="[object Map]",wt="[object Number]",Z="[object Object]",at="[object Promise]",xt="[object RegExp]",P="[object Set]",St="[object String]",Ct="[object Symbol]",k="[object WeakMap]",Ot="[object ArrayBuffer]",B="[object DataView]",$t="[object Float32Array]",jt="[object Float64Array]",Tt="[object Int8Array]",Et="[object Int16Array]",Dt="[object Int32Array]",It="[object Uint8Array]",Pt="[object Uint8ClampedArray]",Bt="[object Uint16Array]",Nt="[object Uint32Array]",fe=/[\\^$.*+?()[\]{}|]/g,pe=/\w*$/,de=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,i={};i[W]=i[ce]=i[Ot]=i[B]=i[_t]=i[vt]=i[$t]=i[jt]=i[Tt]=i[Et]=i[Dt]=i[I]=i[wt]=i[Z]=i[xt]=i[P]=i[St]=i[Ct]=i[It]=i[Pt]=i[Bt]=i[Nt]=!0;i[le]=i[q]=i[k]=!1;var ge=typeof global=="object"&&global&&global.Object===Object&&global,be=typeof self=="object"&&self&&self.Object===Object&&self,d=ge||be||Function("return this")(),Mt=typeof j=="object"&&j&&!j.nodeType&&j,st=Mt&&typeof w=="object"&&w&&!w.nodeType&&w,ye=st&&st.exports===Mt;function me(t,e){return t.set(e[0],e[1]),t}function _e(t,e){return t.add(e),t}function ve(t,e){for(var r=-1,n=t?t.length:0;++r<n&&e(t[r],r,t)!==!1;);return t}function Ae(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function Lt(t,e,r,n){var o=-1,s=t?t.length:0;for(n&&s&&(r=t[++o]);++o<s;)r=e(r,t[o],o,t);return r}function we(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function xe(t,e){return t==null?void 0:t[e]}function Rt(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function ut(t){var e=-1,r=Array(t.size);return t.forEach(function(n,o){r[++e]=[o,n]}),r}function X(t,e){return function(r){return t(e(r))}}function ct(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Se=Array.prototype,Ce=Function.prototype,N=Object.prototype,U=d["__core-js_shared__"],lt=function(){var t=/[^.]+$/.exec(U&&U.keys&&U.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ft=Ce.toString,b=N.hasOwnProperty,M=N.toString,Oe=RegExp("^"+Ft.call(b).replace(fe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ft=ye?d.Buffer:void 0,pt=d.Symbol,dt=d.Uint8Array,$e=X(Object.getPrototypeOf,Object),je=Object.create,Te=N.propertyIsEnumerable,Ee=Se.splice,ht=Object.getOwnPropertySymbols,De=ft?ft.isBuffer:void 0,Ie=X(Object.keys,Object),G=C(d,"DataView"),T=C(d,"Map"),K=C(d,"Promise"),H=C(d,"Set"),Q=C(d,"WeakMap"),E=C(Object,"create"),Pe=v(G),Be=v(T),Ne=v(K),Me=v(H),Le=v(Q),gt=pt?pt.prototype:void 0,bt=gt?gt.valueOf:void 0;function _(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Re(){this.__data__=E?E(null):{}}function Fe(t){return this.has(t)&&delete this.__data__[t]}function Ve(t){var e=this.__data__;if(E){var r=e[t];return r===yt?void 0:r}return b.call(e,t)?e[t]:void 0}function Ue(t){var e=this.__data__;return E?e[t]!==void 0:b.call(e,t)}function ke(t,e){var r=this.__data__;return r[t]=E&&e===void 0?yt:e,this}_.prototype.clear=Re;_.prototype.delete=Fe;_.prototype.get=Ve;_.prototype.has=Ue;_.prototype.set=ke;function h(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Ge(){this.__data__=[]}function Ke(t){var e=this.__data__,r=L(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Ee.call(e,r,1),!0}function He(t){var e=this.__data__,r=L(e,t);return r<0?void 0:e[r][1]}function Qe(t){return L(this.__data__,t)>-1}function Je(t,e){var r=this.__data__,n=L(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}h.prototype.clear=Ge;h.prototype.delete=Ke;h.prototype.get=He;h.prototype.has=Qe;h.prototype.set=Je;function x(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function We(){this.__data__={hash:new _,map:new(T||h),string:new _}}function qe(t){return R(this,t).delete(t)}function Ze(t){return R(this,t).get(t)}function Xe(t){return R(this,t).has(t)}function Ye(t,e){return R(this,t).set(t,e),this}x.prototype.clear=We;x.prototype.delete=qe;x.prototype.get=Ze;x.prototype.has=Xe;x.prototype.set=Ye;function S(t){this.__data__=new h(t)}function ze(){this.__data__=new h}function tr(t){return this.__data__.delete(t)}function er(t){return this.__data__.get(t)}function rr(t){return this.__data__.has(t)}function nr(t,e){var r=this.__data__;if(r instanceof h){var n=r.__data__;if(!T||n.length<ue-1)return n.push([t,e]),this;r=this.__data__=new x(n)}return r.set(t,e),this}S.prototype.clear=ze;S.prototype.delete=tr;S.prototype.get=er;S.prototype.has=rr;S.prototype.set=nr;function or(t,e){var r=z(t)||jr(t)?we(t.length,String):[],n=r.length,o=!!n;for(var s in t)(e||b.call(t,s))&&!(o&&(s=="length"||Sr(s,n)))&&r.push(s);return r}function Vt(t,e,r){var n=t[e];(!(b.call(t,e)&&Kt(n,r))||r===void 0&&!(e in t))&&(t[e]=r)}function L(t,e){for(var r=t.length;r--;)if(Kt(t[r][0],e))return r;return-1}function ir(t,e){return t&&Ut(e,tt(e),t)}function J(t,e,r,n,o,s,f){var u;if(n&&(u=s?n(t,o,s,f):n(t)),u!==void 0)return u;if(!F(t))return t;var l=z(t);if(l){if(u=Ar(t),!e)return mr(t,u)}else{var p=m(t),c=p==q||p==At;if(Er(t))return fr(t,e);if(p==Z||p==W||c&&!s){if(Rt(t))return s?t:{};if(u=wr(c?{}:t),!e)return _r(t,ir(u,t))}else{if(!i[p])return s?t:{};u=xr(t,p,J,e)}}f||(f=new S);var a=f.get(t);if(a)return a;if(f.set(t,u),!l)var g=r?vr(t):tt(t);return ve(g||t,function(y,D){g&&(D=y,y=t[D]),Vt(u,D,J(y,e,r,n,D,t,f))}),u}function ar(t){return F(t)?je(t):{}}function sr(t,e,r){var n=e(t);return z(t)?n:Ae(n,r(t))}function ur(t){return M.call(t)}function cr(t){if(!F(t)||Or(t))return!1;var e=Qt(t)||Rt(t)?Oe:de;return e.test(v(t))}function lr(t){if(!Gt(t))return Ie(t);var e=[];for(var r in Object(t))b.call(t,r)&&r!="constructor"&&e.push(r);return e}function fr(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function Y(t){var e=new t.constructor(t.byteLength);return new dt(e).set(new dt(t)),e}function pr(t,e){var r=e?Y(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function dr(t,e,r){var n=e?r(ut(t),!0):ut(t);return Lt(n,me,new t.constructor)}function hr(t){var e=new t.constructor(t.source,pe.exec(t));return e.lastIndex=t.lastIndex,e}function gr(t,e,r){var n=e?r(ct(t),!0):ct(t);return Lt(n,_e,new t.constructor)}function br(t){return bt?Object(bt.call(t)):{}}function yr(t,e){var r=e?Y(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function mr(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function Ut(t,e,r,n){r||(r={});for(var o=-1,s=e.length;++o<s;){var f=e[o],u=n?n(r[f],t[f],f,r,t):void 0;Vt(r,f,u===void 0?t[f]:u)}return r}function _r(t,e){return Ut(t,kt(t),e)}function vr(t){return sr(t,tt,kt)}function R(t,e){var r=t.__data__;return Cr(e)?r[typeof e=="string"?"string":"hash"]:r.map}function C(t,e){var r=xe(t,e);return cr(r)?r:void 0}var kt=ht?X(ht,Object):Pr,m=ur;(G&&m(new G(new ArrayBuffer(1)))!=B||T&&m(new T)!=I||K&&m(K.resolve())!=at||H&&m(new H)!=P||Q&&m(new Q)!=k)&&(m=function(t){var e=M.call(t),r=e==Z?t.constructor:void 0,n=r?v(r):void 0;if(n)switch(n){case Pe:return B;case Be:return I;case Ne:return at;case Me:return P;case Le:return k}return e});function Ar(t){var e=t.length,r=t.constructor(e);return e&&typeof t[0]=="string"&&b.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function wr(t){return typeof t.constructor=="function"&&!Gt(t)?ar($e(t)):{}}function xr(t,e,r,n){var o=t.constructor;switch(e){case Ot:return Y(t);case _t:case vt:return new o(+t);case B:return pr(t,n);case $t:case jt:case Tt:case Et:case Dt:case It:case Pt:case Bt:case Nt:return yr(t,n);case I:return dr(t,n,r);case wt:case St:return new o(t);case xt:return hr(t);case P:return gr(t,n,r);case Ct:return br(t)}}function Sr(t,e){return e=e==null?mt:e,!!e&&(typeof t=="number"||he.test(t))&&t>-1&&t%1==0&&t<e}function Cr(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Or(t){return!!lt&&lt in t}function Gt(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||N;return t===r}function v(t){if(t!=null){try{return Ft.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function $r(t){return J(t,!0,!0)}function Kt(t,e){return t===e||t!==t&&e!==e}function jr(t){return Tr(t)&&b.call(t,"callee")&&(!Te.call(t,"callee")||M.call(t)==W)}var z=Array.isArray;function Ht(t){return t!=null&&Dr(t.length)&&!Qt(t)}function Tr(t){return Ir(t)&&Ht(t)}var Er=De||Br;function Qt(t){var e=F(t)?M.call(t):"";return e==q||e==At}function Dr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=mt}function F(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Ir(t){return!!t&&typeof t=="object"}function tt(t){return Ht(t)?or(t):lr(t)}function Pr(){return[]}function Br(){return!1}w.exports=$r});var Fr={};ie(Fr,{empty:()=>Rr,version:()=>Lr});var V=ae(Jt(),1);function Wt(t){if(t==null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null?!1:!(Symbol.iterator in t)&&!(Symbol.toStringTag in t)}function Nr(t){if(t.includes(".")){let e=t.lastIndexOf(".");if(!t.slice(0,e).includes("."))return t.slice(0,e);for(let r=e-1;r--;)if(t[r]===".")return t.slice(r+1,e)}return null}var et=Nr;function qt(t,e){let r={now:!1};function n(o,s,f,u){let l=(0,V.default)(o),p,c=A({depth:-1,path:""},f);if(c.depth+=1,Array.isArray(l))for(let a=0,g=l.length;a<g&&!u.now;a++){let y=c.path?`${c.path}.${a}`:`${a}`;l[a]!==void 0?(c.parent=(0,V.default)(l),c.parentType="array",c.parentKey=et(y),p=n(s(l[a],void 0,$(A({},c),{path:y}),u),s,$(A({},c),{path:y}),u),Number.isNaN(p)&&a<l.length?(l.splice(a,1),a-=1):l[a]=p):l.splice(a,1)}else if(Wt(l))for(let a in l){if(u.now&&a!=null)break;let g=c.path?`${c.path}.${a}`:a;c.depth===0&&a!=null&&(c.topmostKey=a),c.parent=(0,V.default)(l),c.parentType="object",c.parentKey=et(g),p=n(s(a,l[a],$(A({},c),{path:g}),u),s,$(A({},c),{path:g}),u),Number.isNaN(p)?delete l[a]:l[a]=p}return l}return n(t,e,{},r)}var Zt="4.0.9";var Lr=Zt;function Rr(t){if(typeof t=="string")return!t.trim();if(!["object","string"].includes(typeof t)||!t)return!1;let e=!0;return t=qt(t,(r,n,o,s)=>{let f=n!==void 0?n:r;return typeof f=="string"&&f.trim()&&(e=!1,s.now=!0),f}),e}return se(Fr);})();
/**
* @name codsen-utils
* @fileoverview Various utility functions
* @version 1.3.1
* @version 1.4.0
* @author Roy Revelt, Codsen Ltd

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

* @fileoverview Utility library to traverse AST
* @version 4.0.8
* @version 4.0.9
* @author Roy Revelt, Codsen Ltd

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

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

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

"dependencies": {
"ast-monkey-traverse": "^4.0.8"
"ast-monkey-traverse": "^4.0.9"
}
}
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