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.3 to 4.0.4

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

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

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

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

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

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

* @fileoverview Utility library to traverse AST
* @version 4.0.3
* @version 4.0.4
* @author Roy Revelt, Codsen Ltd

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

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

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

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