1.0.4 • Published 3 years ago

ts-transform-visitor v1.0.4

Weekly downloads
8
License
MIT
Repository
github
Last release
3 years ago

TS Transform Visitor

A TypeScript utility function to easily create transformers using the visitor pattern.

How to use

import transform from "ts-transform-visitor";
import ts from "typescript";

export default transform("program", function(node) {
  if (ts.isDecorator(node)) return null;
});

The visit function can return either a node, an array of nodes or null to remove the current node. Returning nothing or undefined visits the children nodes.

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago