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

ast-monkey-traverse

Package Overview
Dependencies
Maintainers
1
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ast-monkey-traverse - npm Package Compare versions

Comparing version 3.0.6 to 3.0.7

4

dist/ast-monkey-traverse.esm.js
/**
* @name ast-monkey-traverse
* @fileoverview Utility library to traverse AST
* @version 3.0.6
* @version 3.0.7
* @author Roy Revelt, Codsen Ltd

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

var version$1 = "3.0.6";
var version$1 = "3.0.7";

@@ -17,0 +17,0 @@ const version = version$1;

/**
* @name ast-monkey-traverse
* @fileoverview Utility library to traverse AST
* @version 3.0.6
* @version 3.0.7
* @author Roy Revelt, Codsen Ltd

@@ -14,6 +14,6 @@ * @license MIT

* @fileoverview Utility library of AST helper functions
* @version 2.0.6
* @version 2.0.7
* @author Roy Revelt, Codsen Ltd
* @license MIT
* {@link https://codsen.com/os/ast-monkey-util/}
*/function y(t){if(t.includes(".")){const 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}t.traverse=function(t,e){return function t(e,r,o,c){const u=n(e);let a;const i={depth:-1,path:"",...o};if(i.depth+=1,Array.isArray(u))for(let e=0,o=u.length;e<o&&!c.now;e++){const o=i.path?`${i.path}.${e}`:`${e}`;void 0!==u[e]?(i.parent=n(u),i.parentType="array",i.parentKey=y(o),a=t(r(u[e],void 0,{...i,path:o},c),r,{...i,path:o},c),Number.isNaN(a)&&e<u.length?(u.splice(e,1),e-=1):u[e]=a):u.splice(e,1)}else if(p(u))for(const e in u){if(c.now&&null!=e)break;const o=i.path?`${i.path}.${e}`:e;0===i.depth&&null!=e&&(i.topmostKey=e),i.parent=n(u),i.parentType="object",i.parentKey=y(o),a=t(r(e,u[e],{...i,path:o},c),r,{...i,path:o},c),Number.isNaN(a)?delete u[e]:u[e]=a}return u}(t,e,{},{now:!1})},t.version="3.0.6",Object.defineProperty(t,"__esModule",{value:!0})}));
*/function y(t){if(t.includes(".")){const 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}t.traverse=function(t,e){return function t(e,r,o,c){const u=n(e);let a;const i={depth:-1,path:"",...o};if(i.depth+=1,Array.isArray(u))for(let e=0,o=u.length;e<o&&!c.now;e++){const o=i.path?`${i.path}.${e}`:`${e}`;void 0!==u[e]?(i.parent=n(u),i.parentType="array",i.parentKey=y(o),a=t(r(u[e],void 0,{...i,path:o},c),r,{...i,path:o},c),Number.isNaN(a)&&e<u.length?(u.splice(e,1),e-=1):u[e]=a):u.splice(e,1)}else if(p(u))for(const e in u){if(c.now&&null!=e)break;const o=i.path?`${i.path}.${e}`:e;0===i.depth&&null!=e&&(i.topmostKey=e),i.parent=n(u),i.parentType="object",i.parentKey=y(o),a=t(r(e,u[e],{...i,path:o},c),r,{...i,path:o},c),Number.isNaN(a)?delete u[e]:u[e]=a}return u}(t,e,{},{now:!1})},t.version="3.0.7",Object.defineProperty(t,"__esModule",{value:!0})}));
{
"name": "ast-monkey-traverse",
"version": "3.0.6",
"version": "3.0.7",
"description": "Utility library to traverse AST",

@@ -94,3 +94,3 @@ "keywords": [

"@babel/runtime": "^7.16.3",
"ast-monkey-util": "^2.0.6",
"ast-monkey-util": "^2.0.7",
"lodash.clonedeep": "^4.5.0",

@@ -121,13 +121,13 @@ "lodash.isplainobject": "^4.0.6"

"@types/lodash.isplainobject": "^4.0.6",
"@types/node": "^16.11.9",
"@types/node": "^16.11.10",
"@types/tap": "^15.0.5",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"core-js": "^3.19.1",
"@typescript-eslint/eslint-plugin": "^5.5.0",
"@typescript-eslint/parser": "^5.5.0",
"core-js": "^3.19.2",
"cross-env": "^7.0.3",
"eslint": "^8.3.0",
"lect": "^0.18.6",
"lect": "^0.18.7",
"lodash.isequal": "^4.5.0",
"object-path": "^0.11.8",
"rollup": "^2.60.0",
"rollup": "^2.60.1",
"rollup-plugin-ascii": "^0.0.3",

@@ -138,3 +138,3 @@ "rollup-plugin-banner": "^0.2.1",

"rollup-plugin-terser": "^7.0.2",
"tap": "^15.1.2",
"tap": "^15.1.5",
"tslib": "^2.3.1",

@@ -141,0 +141,0 @@ "typescript": "^4.5.2"

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