ast-monkey-traverse
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -68,8 +68,8 @@ # Change Log | ||
- ✨ Various documentation and setup tweaks after we migrated to monorepo | ||
- ✨ Setup refresh: updated dependencies and all config files using automated tools | ||
- Various documentation and setup tweaks after we migrated to monorepo | ||
- Setup refresh: updated dependencies and all config files using automated tools | ||
## 1.4.0 (2018-10-13) | ||
- ✨ Updated all dependencies and restored coverage tracking both via terminal when testing and through coveralls.io | ||
- Updated all dependencies and restored coverage tracking both via terminal when testing and through coveralls.io | ||
@@ -80,18 +80,18 @@ ## 1.3.0 (2018-06-11) | ||
- ✨ Migrated to BitBucket (to host repo + perform CI) and Codacy (for code quality audit) | ||
- ✨ Dropped BitHound (RIP) and Travis | ||
- ✨ Removed `package-lock` | ||
- Migrated to BitBucket (to host repo + perform CI) and Codacy (for code quality audit) | ||
- Dropped BitHound (RIP) and Travis | ||
- Removed `package-lock` | ||
## 1.2.0 (2018-05-02) | ||
- ✨ Set up [Prettier](https://prettier.io) | ||
- ✨ Removed `package.lock` and `.editorconfig` | ||
- ✨ Wired Rollup to remove comments from non-dev builds. This means we can now leave the `console.log`s in the source code — Rollup will remove from production code. | ||
- Set up [Prettier](https://prettier.io) | ||
- Removed `package.lock` and `.editorconfig` | ||
- Wired Rollup to remove comments from non-dev builds. This means we can now leave the `console.log`s in the source code — Rollup will remove from production code. | ||
## 1.1.0 (2018-01-03) | ||
- ✨ New key in the `innerObj` callback - `innerObj.path`. It's interoperable with [object-path](https://www.npmjs.com/package/object-path). | ||
- New key in the `innerObj` callback - `innerObj.path`. It's interoperable with [object-path](https://www.npmjs.com/package/object-path). | ||
## 1.0.1 (2017-12-22) | ||
- ✨ First public release. | ||
- First public release. |
/** | ||
* @name ast-monkey-traverse | ||
* @fileoverview Utility library to traverse AST | ||
* @version 3.1.1 | ||
* @version 3.1.2 | ||
* @author Roy Revelt, Codsen Ltd | ||
@@ -10,2 +10,2 @@ * @license MIT | ||
import p from"lodash.clonedeep";import g from"lodash.isplainobject";import{parent as m}from"ast-monkey-util";var u="3.1.1";var D=u;function k(c,y){let d={now:!1};function i($,l,b,n){let r=p($),s,t={depth:-1,path:"",...b};if(t.depth+=1,Array.isArray(r))for(let e=0,o=r.length;e<o&&!n.now;e++){let a=t.path?`${t.path}.${e}`:`${e}`;r[e]!==void 0?(t.parent=p(r),t.parentType="array",t.parentKey=m(a),s=i(l(r[e],void 0,{...t,path:a},n),l,{...t,path:a},n),Number.isNaN(s)&&e<r.length?(r.splice(e,1),e-=1):r[e]=s):r.splice(e,1)}else if(g(r))for(let e in r){if(n.now&&e!=null)break;let o=t.path?`${t.path}.${e}`:e;t.depth===0&&e!=null&&(t.topmostKey=e),t.parent=p(r),t.parentType="object",t.parentKey=m(o),s=i(l(e,r[e],{...t,path:o},n),l,{...t,path:o},n),Number.isNaN(s)?delete r[e]:r[e]=s}return r}return i(c,y,{},d)}export{k as traverse,D as version}; | ||
import p from"lodash.clonedeep";import g from"lodash.isplainobject";import{parent as m}from"ast-monkey-util";var u="3.1.2";var D=u;function k(c,y){let d={now:!1};function i($,l,b,n){let r=p($),s,t={depth:-1,path:"",...b};if(t.depth+=1,Array.isArray(r))for(let e=0,o=r.length;e<o&&!n.now;e++){let a=t.path?`${t.path}.${e}`:`${e}`;r[e]!==void 0?(t.parent=p(r),t.parentType="array",t.parentKey=m(a),s=i(l(r[e],void 0,{...t,path:a},n),l,{...t,path:a},n),Number.isNaN(s)&&e<r.length?(r.splice(e,1),e-=1):r[e]=s):r.splice(e,1)}else if(g(r))for(let e in r){if(n.now&&e!=null)break;let o=t.path?`${t.path}.${e}`:e;t.depth===0&&e!=null&&(t.topmostKey=e),t.parent=p(r),t.parentType="object",t.parentKey=m(o),s=i(l(e,r[e],{...t,path:o},n),l,{...t,path:o},n),Number.isNaN(s)?delete r[e]:r[e]=s}return r}return i(c,y,{},d)}export{k as traverse,D as version}; |
/** | ||
* @name ast-monkey-traverse | ||
* @fileoverview Utility library to traverse AST | ||
* @version 3.1.1 | ||
* @version 3.1.2 | ||
* @author Roy Revelt, Codsen Ltd | ||
@@ -10,7 +10,7 @@ * @license MIT | ||
"use strict";var astMonkeyTraverse=(()=>{var re=Object.create;var T=Object.defineProperty,ne=Object.defineProperties,oe=Object.getOwnPropertyDescriptor,ie=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertyNames,rt=Object.getOwnPropertySymbols,se=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable;var nt=(t,e,r)=>e in t?T(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,v=(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))ce.call(e,r)&&nt(t,r,e[r]);return t},w=(t,e)=>ne(t,ie(e));var it=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ue=(t,e)=>{for(var r in e)T(t,r,{get:e[r],enumerable:!0})},at=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ae(e))!ot.call(t,o)&&o!==r&&T(t,o,{get:()=>e[o],enumerable:!(n=oe(e,o))||n.enumerable});return t};var st=(t,e,r)=>(r=t!=null?re(se(t)):{},at(e||!t||!t.__esModule?T(r,"default",{value:t,enumerable:!0}):r,t)),le=t=>at(T({},"__esModule",{value:!0}),t);var Yt=it((A,j)=>{var fe=200,mt="__lodash_hash_undefined__",$t=9007199254740991,q="[object Arguments]",pe="[object Array]",vt="[object Boolean]",jt="[object Date]",de="[object Error]",Y="[object Function]",Ot="[object GeneratorFunction]",P="[object Map]",St="[object Number]",X="[object Object]",ct="[object Promise]",xt="[object RegExp]",D="[object Set]",Tt="[object String]",wt="[object Symbol]",k="[object WeakMap]",At="[object ArrayBuffer]",N="[object DataView]",Et="[object Float32Array]",Ct="[object Float64Array]",It="[object Int8Array]",Pt="[object Int16Array]",Dt="[object Int32Array]",Nt="[object Uint8Array]",Kt="[object Uint8ClampedArray]",Vt="[object Uint16Array]",Mt="[object Uint32Array]",he=/[\\^$.*+?()[\]{}|]/g,ge=/\w*$/,be=/^\[object .+?Constructor\]$/,ye=/^(?:0|[1-9]\d*)$/,i={};i[q]=i[pe]=i[At]=i[N]=i[vt]=i[jt]=i[Et]=i[Ct]=i[It]=i[Pt]=i[Dt]=i[P]=i[St]=i[X]=i[xt]=i[D]=i[Tt]=i[wt]=i[Nt]=i[Kt]=i[Vt]=i[Mt]=!0;i[de]=i[Y]=i[k]=!1;var _e=typeof global=="object"&&global&&global.Object===Object&&global,me=typeof self=="object"&&self&&self.Object===Object&&self,d=_e||me||Function("return this")(),Rt=typeof A=="object"&&A&&!A.nodeType&&A,ut=Rt&&typeof j=="object"&&j&&!j.nodeType&&j,$e=ut&&ut.exports===Rt;function ve(t,e){return t.set(e[0],e[1]),t}function je(t,e){return t.add(e),t}function Oe(t,e){for(var r=-1,n=t?t.length:0;++r<n&&e(t[r],r,t)!==!1;);return t}function Se(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function Ut(t,e,r,n){var o=-1,c=t?t.length:0;for(n&&c&&(r=t[++o]);++o<c;)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 Te(t,e){return t==null?void 0:t[e]}function Bt(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function lt(t){var e=-1,r=Array(t.size);return t.forEach(function(n,o){r[++e]=[o,n]}),r}function Z(t,e){return function(r){return t(e(r))}}function ft(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var we=Array.prototype,Ae=Function.prototype,K=Object.prototype,G=d["__core-js_shared__"],pt=function(){var t=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Gt=Ae.toString,b=K.hasOwnProperty,V=K.toString,Ee=RegExp("^"+Gt.call(b).replace(he,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),dt=$e?d.Buffer:void 0,ht=d.Symbol,gt=d.Uint8Array,Ce=Z(Object.getPrototypeOf,Object),Ie=Object.create,Pe=K.propertyIsEnumerable,De=we.splice,bt=Object.getOwnPropertySymbols,Ne=dt?dt.isBuffer:void 0,Ke=Z(Object.keys,Object),F=x(d,"DataView"),E=x(d,"Map"),H=x(d,"Promise"),L=x(d,"Set"),J=x(d,"WeakMap"),C=x(Object,"create"),Ve=$(F),Me=$(E),Re=$(H),Ue=$(L),Be=$(J),yt=ht?ht.prototype:void 0,_t=yt?yt.valueOf:void 0;function m(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__=C?C(null):{}}function ke(t){return this.has(t)&&delete this.__data__[t]}function Fe(t){var e=this.__data__;if(C){var r=e[t];return r===mt?void 0:r}return b.call(e,t)?e[t]:void 0}function He(t){var e=this.__data__;return C?e[t]!==void 0:b.call(e,t)}function Le(t,e){var r=this.__data__;return r[t]=C&&e===void 0?mt:e,this}m.prototype.clear=Ge;m.prototype.delete=ke;m.prototype.get=Fe;m.prototype.has=He;m.prototype.set=Le;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 Je(){this.__data__=[]}function We(t){var e=this.__data__,r=M(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():De.call(e,r,1),!0}function qe(t){var e=this.__data__,r=M(e,t);return r<0?void 0:e[r][1]}function Ye(t){return M(this.__data__,t)>-1}function Xe(t,e){var r=this.__data__,n=M(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}h.prototype.clear=Je;h.prototype.delete=We;h.prototype.get=qe;h.prototype.has=Ye;h.prototype.set=Xe;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 Ze(){this.__data__={hash:new m,map:new(E||h),string:new m}}function Qe(t){return R(this,t).delete(t)}function ze(t){return R(this,t).get(t)}function tr(t){return R(this,t).has(t)}function er(t,e){return R(this,t).set(t,e),this}O.prototype.clear=Ze;O.prototype.delete=Qe;O.prototype.get=ze;O.prototype.has=tr;O.prototype.set=er;function S(t){this.__data__=new h(t)}function rr(){this.__data__=new h}function nr(t){return this.__data__.delete(t)}function or(t){return this.__data__.get(t)}function ir(t){return this.__data__.has(t)}function ar(t,e){var r=this.__data__;if(r instanceof h){var n=r.__data__;if(!E||n.length<fe-1)return n.push([t,e]),this;r=this.__data__=new O(n)}return r.set(t,e),this}S.prototype.clear=rr;S.prototype.delete=nr;S.prototype.get=or;S.prototype.has=ir;S.prototype.set=ar;function sr(t,e){var r=z(t)||Ir(t)?xe(t.length,String):[],n=r.length,o=!!n;for(var c in t)(e||b.call(t,c))&&!(o&&(c=="length"||wr(c,n)))&&r.push(c);return r}function kt(t,e,r){var n=t[e];(!(b.call(t,e)&&Jt(n,r))||r===void 0&&!(e in t))&&(t[e]=r)}function M(t,e){for(var r=t.length;r--;)if(Jt(t[r][0],e))return r;return-1}function cr(t,e){return t&&Ft(e,tt(e),t)}function W(t,e,r,n,o,c,f){var s;if(n&&(s=c?n(t,o,c,f):n(t)),s!==void 0)return s;if(!U(t))return t;var l=z(t);if(l){if(s=Sr(t),!e)return vr(t,s)}else{var p=_(t),u=p==Y||p==Ot;if(Dr(t))return hr(t,e);if(p==X||p==q||u&&!c){if(Bt(t))return c?t:{};if(s=xr(u?{}:t),!e)return jr(t,cr(s,t))}else{if(!i[p])return c?t:{};s=Tr(t,p,W,e)}}f||(f=new S);var a=f.get(t);if(a)return a;if(f.set(t,s),!l)var g=r?Or(t):tt(t);return Oe(g||t,function(y,I){g&&(I=y,y=t[I]),kt(s,I,W(y,e,r,n,I,t,f))}),s}function ur(t){return U(t)?Ie(t):{}}function lr(t,e,r){var n=e(t);return z(t)?n:Se(n,r(t))}function fr(t){return V.call(t)}function pr(t){if(!U(t)||Er(t))return!1;var e=qt(t)||Bt(t)?Ee:be;return e.test($(t))}function dr(t){if(!Lt(t))return Ke(t);var e=[];for(var r in Object(t))b.call(t,r)&&r!="constructor"&&e.push(r);return e}function hr(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function Q(t){var e=new t.constructor(t.byteLength);return new gt(e).set(new gt(t)),e}function gr(t,e){var r=e?Q(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function br(t,e,r){var n=e?r(lt(t),!0):lt(t);return Ut(n,ve,new t.constructor)}function yr(t){var e=new t.constructor(t.source,ge.exec(t));return e.lastIndex=t.lastIndex,e}function _r(t,e,r){var n=e?r(ft(t),!0):ft(t);return Ut(n,je,new t.constructor)}function mr(t){return _t?Object(_t.call(t)):{}}function $r(t,e){var r=e?Q(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function vr(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function Ft(t,e,r,n){r||(r={});for(var o=-1,c=e.length;++o<c;){var f=e[o],s=n?n(r[f],t[f],f,r,t):void 0;kt(r,f,s===void 0?t[f]:s)}return r}function jr(t,e){return Ft(t,Ht(t),e)}function Or(t){return lr(t,tt,Ht)}function R(t,e){var r=t.__data__;return Ar(e)?r[typeof e=="string"?"string":"hash"]:r.map}function x(t,e){var r=Te(t,e);return pr(r)?r:void 0}var Ht=bt?Z(bt,Object):Vr,_=fr;(F&&_(new F(new ArrayBuffer(1)))!=N||E&&_(new E)!=P||H&&_(H.resolve())!=ct||L&&_(new L)!=D||J&&_(new J)!=k)&&(_=function(t){var e=V.call(t),r=e==X?t.constructor:void 0,n=r?$(r):void 0;if(n)switch(n){case Ve:return N;case Me:return P;case Re:return ct;case Ue:return D;case Be:return k}return e});function Sr(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"&&!Lt(t)?ur(Ce(t)):{}}function Tr(t,e,r,n){var o=t.constructor;switch(e){case At:return Q(t);case vt:case jt:return new o(+t);case N:return gr(t,n);case Et:case Ct:case It:case Pt:case Dt:case Nt:case Kt:case Vt:case Mt:return $r(t,n);case P:return br(t,n,r);case St:case Tt:return new o(t);case xt:return yr(t);case D:return _r(t,n,r);case wt:return mr(t)}}function wr(t,e){return e=e==null?$t:e,!!e&&(typeof t=="number"||ye.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 Er(t){return!!pt&&pt in t}function Lt(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||K;return t===r}function $(t){if(t!=null){try{return Gt.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Cr(t){return W(t,!0,!0)}function Jt(t,e){return t===e||t!==t&&e!==e}function Ir(t){return Pr(t)&&b.call(t,"callee")&&(!Pe.call(t,"callee")||V.call(t)==q)}var z=Array.isArray;function Wt(t){return t!=null&&Nr(t.length)&&!qt(t)}function Pr(t){return Kr(t)&&Wt(t)}var Dr=Ne||Mr;function qt(t){var e=U(t)?V.call(t):"";return e==Y||e==Ot}function Nr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=$t}function U(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Kr(t){return!!t&&typeof t=="object"}function tt(t){return Wt(t)?sr(t):dr(t)}function Vr(){return[]}function Mr(){return!1}j.exports=Cr});var zt=it((tn,Qt)=>{var Rr="[object Object]";function Ur(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function Br(t,e){return function(r){return t(e(r))}}var Gr=Function.prototype,Xt=Object.prototype,Zt=Gr.toString,kr=Xt.hasOwnProperty,Fr=Zt.call(Object),Hr=Xt.toString,Lr=Br(Object.getPrototypeOf,Object);function Jr(t){return!!t&&typeof t=="object"}function Wr(t){if(!Jr(t)||Hr.call(t)!=Rr||Ur(t))return!1;var e=Lr(t);if(e===null)return!0;var r=kr.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Zt.call(r)==Fr}Qt.exports=Wr});var Qr={};ue(Qr,{traverse:()=>Zr,version:()=>Xr});var B=st(Yt(),1),ee=st(zt(),1);function qr(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=qr;var te="3.1.1";var Xr=te;function Zr(t,e){let r={now:!1};function n(o,c,f,s){let l=(0,B.default)(o),p,u=v({depth:-1,path:""},f);if(u.depth+=1,Array.isArray(l))for(let a=0,g=l.length;a<g&&!s.now;a++){let y=u.path?`${u.path}.${a}`:`${a}`;l[a]!==void 0?(u.parent=(0,B.default)(l),u.parentType="array",u.parentKey=et(y),p=n(c(l[a],void 0,w(v({},u),{path:y}),s),c,w(v({},u),{path:y}),s),Number.isNaN(p)&&a<l.length?(l.splice(a,1),a-=1):l[a]=p):l.splice(a,1)}else if((0,ee.default)(l))for(let a in l){if(s.now&&a!=null)break;let g=u.path?`${u.path}.${a}`:a;u.depth===0&&a!=null&&(u.topmostKey=a),u.parent=(0,B.default)(l),u.parentType="object",u.parentKey=et(g),p=n(c(a,l[a],w(v({},u),{path:g}),s),c,w(v({},u),{path:g}),s),Number.isNaN(p)?delete l[a]:l[a]=p}return l}return n(t,e,{},r)}return le(Qr);})(); | ||
"use strict";var astMonkeyTraverse=(()=>{var re=Object.create;var T=Object.defineProperty,ne=Object.defineProperties,oe=Object.getOwnPropertyDescriptor,ie=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertyNames,rt=Object.getOwnPropertySymbols,se=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable;var nt=(t,e,r)=>e in t?T(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,v=(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))ce.call(e,r)&&nt(t,r,e[r]);return t},w=(t,e)=>ne(t,ie(e));var it=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ue=(t,e)=>{for(var r in e)T(t,r,{get:e[r],enumerable:!0})},at=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ae(e))!ot.call(t,o)&&o!==r&&T(t,o,{get:()=>e[o],enumerable:!(n=oe(e,o))||n.enumerable});return t};var st=(t,e,r)=>(r=t!=null?re(se(t)):{},at(e||!t||!t.__esModule?T(r,"default",{value:t,enumerable:!0}):r,t)),le=t=>at(T({},"__esModule",{value:!0}),t);var Yt=it((A,j)=>{var fe=200,mt="__lodash_hash_undefined__",$t=9007199254740991,q="[object Arguments]",pe="[object Array]",vt="[object Boolean]",jt="[object Date]",de="[object Error]",Y="[object Function]",Ot="[object GeneratorFunction]",P="[object Map]",St="[object Number]",X="[object Object]",ct="[object Promise]",xt="[object RegExp]",D="[object Set]",Tt="[object String]",wt="[object Symbol]",k="[object WeakMap]",At="[object ArrayBuffer]",N="[object DataView]",Et="[object Float32Array]",Ct="[object Float64Array]",It="[object Int8Array]",Pt="[object Int16Array]",Dt="[object Int32Array]",Nt="[object Uint8Array]",Kt="[object Uint8ClampedArray]",Vt="[object Uint16Array]",Mt="[object Uint32Array]",he=/[\\^$.*+?()[\]{}|]/g,ge=/\w*$/,be=/^\[object .+?Constructor\]$/,ye=/^(?:0|[1-9]\d*)$/,i={};i[q]=i[pe]=i[At]=i[N]=i[vt]=i[jt]=i[Et]=i[Ct]=i[It]=i[Pt]=i[Dt]=i[P]=i[St]=i[X]=i[xt]=i[D]=i[Tt]=i[wt]=i[Nt]=i[Kt]=i[Vt]=i[Mt]=!0;i[de]=i[Y]=i[k]=!1;var _e=typeof global=="object"&&global&&global.Object===Object&&global,me=typeof self=="object"&&self&&self.Object===Object&&self,d=_e||me||Function("return this")(),Rt=typeof A=="object"&&A&&!A.nodeType&&A,ut=Rt&&typeof j=="object"&&j&&!j.nodeType&&j,$e=ut&&ut.exports===Rt;function ve(t,e){return t.set(e[0],e[1]),t}function je(t,e){return t.add(e),t}function Oe(t,e){for(var r=-1,n=t?t.length:0;++r<n&&e(t[r],r,t)!==!1;);return t}function Se(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function Ut(t,e,r,n){var o=-1,c=t?t.length:0;for(n&&c&&(r=t[++o]);++o<c;)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 Te(t,e){return t==null?void 0:t[e]}function Bt(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function lt(t){var e=-1,r=Array(t.size);return t.forEach(function(n,o){r[++e]=[o,n]}),r}function Z(t,e){return function(r){return t(e(r))}}function ft(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var we=Array.prototype,Ae=Function.prototype,K=Object.prototype,G=d["__core-js_shared__"],pt=function(){var t=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Gt=Ae.toString,b=K.hasOwnProperty,V=K.toString,Ee=RegExp("^"+Gt.call(b).replace(he,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),dt=$e?d.Buffer:void 0,ht=d.Symbol,gt=d.Uint8Array,Ce=Z(Object.getPrototypeOf,Object),Ie=Object.create,Pe=K.propertyIsEnumerable,De=we.splice,bt=Object.getOwnPropertySymbols,Ne=dt?dt.isBuffer:void 0,Ke=Z(Object.keys,Object),F=x(d,"DataView"),E=x(d,"Map"),H=x(d,"Promise"),L=x(d,"Set"),J=x(d,"WeakMap"),C=x(Object,"create"),Ve=$(F),Me=$(E),Re=$(H),Ue=$(L),Be=$(J),yt=ht?ht.prototype:void 0,_t=yt?yt.valueOf:void 0;function m(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__=C?C(null):{}}function ke(t){return this.has(t)&&delete this.__data__[t]}function Fe(t){var e=this.__data__;if(C){var r=e[t];return r===mt?void 0:r}return b.call(e,t)?e[t]:void 0}function He(t){var e=this.__data__;return C?e[t]!==void 0:b.call(e,t)}function Le(t,e){var r=this.__data__;return r[t]=C&&e===void 0?mt:e,this}m.prototype.clear=Ge;m.prototype.delete=ke;m.prototype.get=Fe;m.prototype.has=He;m.prototype.set=Le;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 Je(){this.__data__=[]}function We(t){var e=this.__data__,r=M(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():De.call(e,r,1),!0}function qe(t){var e=this.__data__,r=M(e,t);return r<0?void 0:e[r][1]}function Ye(t){return M(this.__data__,t)>-1}function Xe(t,e){var r=this.__data__,n=M(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}h.prototype.clear=Je;h.prototype.delete=We;h.prototype.get=qe;h.prototype.has=Ye;h.prototype.set=Xe;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 Ze(){this.__data__={hash:new m,map:new(E||h),string:new m}}function Qe(t){return R(this,t).delete(t)}function ze(t){return R(this,t).get(t)}function tr(t){return R(this,t).has(t)}function er(t,e){return R(this,t).set(t,e),this}O.prototype.clear=Ze;O.prototype.delete=Qe;O.prototype.get=ze;O.prototype.has=tr;O.prototype.set=er;function S(t){this.__data__=new h(t)}function rr(){this.__data__=new h}function nr(t){return this.__data__.delete(t)}function or(t){return this.__data__.get(t)}function ir(t){return this.__data__.has(t)}function ar(t,e){var r=this.__data__;if(r instanceof h){var n=r.__data__;if(!E||n.length<fe-1)return n.push([t,e]),this;r=this.__data__=new O(n)}return r.set(t,e),this}S.prototype.clear=rr;S.prototype.delete=nr;S.prototype.get=or;S.prototype.has=ir;S.prototype.set=ar;function sr(t,e){var r=z(t)||Ir(t)?xe(t.length,String):[],n=r.length,o=!!n;for(var c in t)(e||b.call(t,c))&&!(o&&(c=="length"||wr(c,n)))&&r.push(c);return r}function kt(t,e,r){var n=t[e];(!(b.call(t,e)&&Jt(n,r))||r===void 0&&!(e in t))&&(t[e]=r)}function M(t,e){for(var r=t.length;r--;)if(Jt(t[r][0],e))return r;return-1}function cr(t,e){return t&&Ft(e,tt(e),t)}function W(t,e,r,n,o,c,f){var s;if(n&&(s=c?n(t,o,c,f):n(t)),s!==void 0)return s;if(!U(t))return t;var l=z(t);if(l){if(s=Sr(t),!e)return vr(t,s)}else{var p=_(t),u=p==Y||p==Ot;if(Dr(t))return hr(t,e);if(p==X||p==q||u&&!c){if(Bt(t))return c?t:{};if(s=xr(u?{}:t),!e)return jr(t,cr(s,t))}else{if(!i[p])return c?t:{};s=Tr(t,p,W,e)}}f||(f=new S);var a=f.get(t);if(a)return a;if(f.set(t,s),!l)var g=r?Or(t):tt(t);return Oe(g||t,function(y,I){g&&(I=y,y=t[I]),kt(s,I,W(y,e,r,n,I,t,f))}),s}function ur(t){return U(t)?Ie(t):{}}function lr(t,e,r){var n=e(t);return z(t)?n:Se(n,r(t))}function fr(t){return V.call(t)}function pr(t){if(!U(t)||Er(t))return!1;var e=qt(t)||Bt(t)?Ee:be;return e.test($(t))}function dr(t){if(!Lt(t))return Ke(t);var e=[];for(var r in Object(t))b.call(t,r)&&r!="constructor"&&e.push(r);return e}function hr(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function Q(t){var e=new t.constructor(t.byteLength);return new gt(e).set(new gt(t)),e}function gr(t,e){var r=e?Q(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function br(t,e,r){var n=e?r(lt(t),!0):lt(t);return Ut(n,ve,new t.constructor)}function yr(t){var e=new t.constructor(t.source,ge.exec(t));return e.lastIndex=t.lastIndex,e}function _r(t,e,r){var n=e?r(ft(t),!0):ft(t);return Ut(n,je,new t.constructor)}function mr(t){return _t?Object(_t.call(t)):{}}function $r(t,e){var r=e?Q(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function vr(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function Ft(t,e,r,n){r||(r={});for(var o=-1,c=e.length;++o<c;){var f=e[o],s=n?n(r[f],t[f],f,r,t):void 0;kt(r,f,s===void 0?t[f]:s)}return r}function jr(t,e){return Ft(t,Ht(t),e)}function Or(t){return lr(t,tt,Ht)}function R(t,e){var r=t.__data__;return Ar(e)?r[typeof e=="string"?"string":"hash"]:r.map}function x(t,e){var r=Te(t,e);return pr(r)?r:void 0}var Ht=bt?Z(bt,Object):Vr,_=fr;(F&&_(new F(new ArrayBuffer(1)))!=N||E&&_(new E)!=P||H&&_(H.resolve())!=ct||L&&_(new L)!=D||J&&_(new J)!=k)&&(_=function(t){var e=V.call(t),r=e==X?t.constructor:void 0,n=r?$(r):void 0;if(n)switch(n){case Ve:return N;case Me:return P;case Re:return ct;case Ue:return D;case Be:return k}return e});function Sr(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"&&!Lt(t)?ur(Ce(t)):{}}function Tr(t,e,r,n){var o=t.constructor;switch(e){case At:return Q(t);case vt:case jt:return new o(+t);case N:return gr(t,n);case Et:case Ct:case It:case Pt:case Dt:case Nt:case Kt:case Vt:case Mt:return $r(t,n);case P:return br(t,n,r);case St:case Tt:return new o(t);case xt:return yr(t);case D:return _r(t,n,r);case wt:return mr(t)}}function wr(t,e){return e=e==null?$t:e,!!e&&(typeof t=="number"||ye.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 Er(t){return!!pt&&pt in t}function Lt(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||K;return t===r}function $(t){if(t!=null){try{return Gt.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Cr(t){return W(t,!0,!0)}function Jt(t,e){return t===e||t!==t&&e!==e}function Ir(t){return Pr(t)&&b.call(t,"callee")&&(!Pe.call(t,"callee")||V.call(t)==q)}var z=Array.isArray;function Wt(t){return t!=null&&Nr(t.length)&&!qt(t)}function Pr(t){return Kr(t)&&Wt(t)}var Dr=Ne||Mr;function qt(t){var e=U(t)?V.call(t):"";return e==Y||e==Ot}function Nr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=$t}function U(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Kr(t){return!!t&&typeof t=="object"}function tt(t){return Wt(t)?sr(t):dr(t)}function Vr(){return[]}function Mr(){return!1}j.exports=Cr});var zt=it((tn,Qt)=>{var Rr="[object Object]";function Ur(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function Br(t,e){return function(r){return t(e(r))}}var Gr=Function.prototype,Xt=Object.prototype,Zt=Gr.toString,kr=Xt.hasOwnProperty,Fr=Zt.call(Object),Hr=Xt.toString,Lr=Br(Object.getPrototypeOf,Object);function Jr(t){return!!t&&typeof t=="object"}function Wr(t){if(!Jr(t)||Hr.call(t)!=Rr||Ur(t))return!1;var e=Lr(t);if(e===null)return!0;var r=kr.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Zt.call(r)==Fr}Qt.exports=Wr});var Qr={};ue(Qr,{traverse:()=>Zr,version:()=>Xr});var B=st(Yt(),1),ee=st(zt(),1);function qr(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=qr;var te="3.1.2";var Xr=te;function Zr(t,e){let r={now:!1};function n(o,c,f,s){let l=(0,B.default)(o),p,u=v({depth:-1,path:""},f);if(u.depth+=1,Array.isArray(l))for(let a=0,g=l.length;a<g&&!s.now;a++){let y=u.path?`${u.path}.${a}`:`${a}`;l[a]!==void 0?(u.parent=(0,B.default)(l),u.parentType="array",u.parentKey=et(y),p=n(c(l[a],void 0,w(v({},u),{path:y}),s),c,w(v({},u),{path:y}),s),Number.isNaN(p)&&a<l.length?(l.splice(a,1),a-=1):l[a]=p):l.splice(a,1)}else if((0,ee.default)(l))for(let a in l){if(s.now&&a!=null)break;let g=u.path?`${u.path}.${a}`:a;u.depth===0&&a!=null&&(u.topmostKey=a),u.parent=(0,B.default)(l),u.parentType="object",u.parentKey=et(g),p=n(c(a,l[a],w(v({},u),{path:g}),s),c,w(v({},u),{path:g}),s),Number.isNaN(p)?delete l[a]:l[a]=p}return l}return n(t,e,{},r)}return le(Qr);})(); | ||
/** | ||
* @name ast-monkey-util | ||
* @fileoverview Utility library of AST helper functions | ||
* @version 2.1.1 | ||
* @version 2.1.2 | ||
* @author Roy Revelt, Codsen Ltd | ||
@@ -17,0 +17,0 @@ * @license MIT |
{ | ||
"name": "ast-monkey-traverse", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "Utility library to traverse AST", | ||
@@ -82,3 +82,3 @@ "keywords": [ | ||
"dependencies": { | ||
"ast-monkey-util": "^2.1.1", | ||
"ast-monkey-util": "^2.1.2", | ||
"lodash.clonedeep": "^4.5.0", | ||
@@ -85,0 +85,0 @@ "lodash.isplainobject": "^4.0.6" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25739
Updatedast-monkey-util@^2.1.2