Socket
Socket
Sign inDemoInstall

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 2.0.14 to 2.0.15

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # Change Log

## 2.0.15 (2021-04-11)
### Reverts
- Revert "chore: setup refresh" ([23cf206](https://github.com/codsen/codsen/commit/23cf206970a087ff0fa04e61f94d919f59ab3881))
## 2.0.1 (2021-01-28)

@@ -8,0 +14,0 @@

4

dist/ast-monkey-traverse.cjs.js
/**
* @name ast-monkey-traverse
* @fileoverview Utility library to traverse AST
* @version 2.0.14
* @version 2.0.15
* @author Roy Revelt, Codsen Ltd

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

var version$1 = "2.0.14";
var version$1 = "2.0.15";

@@ -28,0 +28,0 @@ var version = version$1;

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

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

* @fileoverview Utility library of AST helper functions
* @version 1.3.14
* @version 1.3.15
* @author Roy Revelt, Codsen Ltd

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

var version$1 = "2.0.14";
var version$1 = "2.0.15";

@@ -1941,0 +1941,0 @@ /* eslint @typescript-eslint/explicit-module-boundary-types:0 */

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

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

var version$1 = "2.0.14";
var version$1 = "2.0.15";

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

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

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

* @fileoverview Utility library of AST helper functions
* @version 1.3.14
* @version 1.3.15
* @author Roy Revelt, Codsen Ltd
* @license MIT
* {@link https://codsen.com/os/ast-monkey-util/}
*/function p(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,n,o,c){const u=r(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=r(u),i.parentType="array",i.parentKey=p(o),a=t(n(u[e],void 0,{...i,path:o},c),n,{...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(l(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=r(u),i.parentType="object",i.parentKey=p(o),a=t(n(e,u[e],{...i,path:o},c),n,{...i,path:o},c),Number.isNaN(a)?delete u[e]:u[e]=a}return u}(t,e,{},{now:!1})},t.version="2.0.14",Object.defineProperty(t,"__esModule",{value:!0})}));
*/function p(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,n,o,c){const u=r(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=r(u),i.parentType="array",i.parentKey=p(o),a=t(n(u[e],void 0,{...i,path:o},c),n,{...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(l(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=r(u),i.parentType="object",i.parentKey=p(o),a=t(n(e,u[e],{...i,path:o},c),n,{...i,path:o},c),Number.isNaN(a)?delete u[e]:u[e]=a}return u}(t,e,{},{now:!1})},t.version="2.0.15",Object.defineProperty(t,"__esModule",{value:!0})}));
{
"name": "ast-monkey-traverse",
"version": "2.0.14",
"version": "2.0.15",
"description": "Utility library to traverse AST",

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

"@babel/runtime": "^7.13.10",
"ast-monkey-util": "^1.3.14",
"ast-monkey-util": "^1.3.15",
"lodash.clonedeep": "^4.5.0",

@@ -128,3 +128,3 @@ "lodash.isplainobject": "^4.0.6"

"eslint": "^7.23.0",
"lect": "^0.16.14",
"lect": "^0.16.15",
"lodash.isequal": "^4.5.0",

@@ -131,0 +131,0 @@ "object-path": "^0.11.5",

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