'use strict';

var visitors = require('./vendor/fbtransform/visitors').transformVisitors;
var transform = require('jstransform').transform;

module.exports = {
  transform: function(code) {
    return transform(visitors.react, code).code;
  }
};

'use strict';

var visitors = require('./vendor/fbtransform/visitors');
var transform = require('jstransform').transform;

module.exports = {
  transform: function(code, options) {
    var visitorList;
    if (options && options.harmony) {
      visitorList = visitors.getAllVisitors();
    } else {
      visitorList = visitors.transformVisitors.react;
    }
    return transform(visitorList, code).code;
  }
};

Add support for {harmony: true} to react-tools
Add support for {harmony: true} to react-tools

```
require('react-tools').transform(code, {harmony: true});
```

now enables all the harmony es6 transforms that are supported.

This is modeled after https://github.com/facebook/react/blob/master/bin/jsx#L17-L23