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

zimmerframe

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zimmerframe - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

2

package.json
{
"name": "zimmerframe",
"description": "A tool for walking ASTs",
"version": "1.0.0",
"version": "1.1.0",
"repository": {

@@ -6,0 +6,0 @@ "type": "git",

@@ -126,3 +126,3 @@ # zimmerframe

- `next(state?: State): void` — a function that allows you to control when child nodes are visited, and which state they are visited with
- `next(state?: State): void` — a function that allows you to control when child nodes are visited, and which state they are visited with. If child visitors transform their inputs, this will return the transformed node (if not, returns `undefined`)
- `path: Node[]` — an array of parent nodes. For example, to get the root node you would do `path.at(0)`; to get the current node's immediate parent you would do `path.at(-1)`

@@ -129,0 +129,0 @@ - `state: State` — an object of the same type as the second argument to `walk`. Visitors can pass new state objects to their children with `next(childState)` or `visit(node, childState)`

@@ -16,3 +16,3 @@ type BaseNode = { type: string };

export interface Context<T, U> {
next: (state?: U) => void;
next: (state?: U) => T | void;
path: T[];

@@ -19,0 +19,0 @@ state: U;

@@ -76,2 +76,6 @@ /**

path.pop();
if (Object.keys(mutations).length > 0) {
return { ...node, ...mutations };
}
},

@@ -107,2 +111,4 @@ stop: () => {

});
return inner_result;
}

@@ -109,0 +115,0 @@ });

@@ -20,3 +20,3 @@ declare module 'zimmerframe' {

export interface Context<T, U> {
next: (state?: U) => void;
next: (state?: U) => T | void;
path: T[];

@@ -23,0 +23,0 @@ state: U;

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