babel/packages
Justin Ridgewell 24d766fc57 Replace arrow expression body with block statement
Without this, the only way to replace the arrow function is to either
manually override its `node.body`, or duplicate the arrow:

```js
// Old
ArrowFunctionExpression: function (node) {
  node.body = t.blockStatement(...);
  // Or
  return t.ArrowFunctionExpression(
    node.params,
    t.blockStatement(...),
    node.async
  );
}

// New
ArrowFunctionExpression: function() {
  this.get("body").replaceWith(t.blockStatement(...));
}
```
2015-09-30 15:01:35 -04:00
..
2015-09-23 21:05:57 -07:00
2015-07-31 21:24:00 +01:00
2015-08-27 16:38:34 -07:00