Skip to content

hoist your variables (and function declarations)

Notifications You must be signed in to change notification settings

wizzard0/ast-hoist

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

hoist your variables (and function declarations)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%