-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
node.wrap('try {\n', '\n}')
// identical to:
node.before('try {\n')
node.after('\n}')You can wrap the node with anything, but the main use cases are blocks and call expressions.
Do we have a separate method for "block wrapping" that indents the wrapped node and implicitly adds the newline characters seen above? Or maybe passing true as the third argument can do that?
node.wrap('try {', '}', true)
// or
node.bwrap('try {', '}')Not a big fan of the name bwrap though.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request