Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

hoist your variables (and function declarations)

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Readme.md

ast-hoist

Hoists your variable and function declarations. Consumes/produces Mozilla ASTs.

API

hoist(Node, recurse = false) -> Node

Returns a new AST with all variable declarations hoisted into a single var statement at the start of the scope, and all function declarations hoisted right after it. If recurse is truthy, it will recurse to cover every scope in the AST.

Something went wrong with that request. Please try again.