[RFC] Node.prototype.wrap
オープン
enhancement
- 主要言語
- TypeScript
- スター
- 16
- フォーク
- 1
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
```js
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?
```js
node.wrap('try {', '}', true)
// or
node.bwrap('try {', '}')
```
Not a big fan of the name `bwrap` though.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。