Interoperability between Sketch.export and ExportFormats
It is pretty painful that Sketch.export doesn’t follow the conventions of the ExportFormats object. I always have to interpret the ExportFormat object and reformat it so that Sketch.export can interpret it.

Example:

```
let sketch = require(’sketch’)
let layer = sketch.getSelectedDocument.selectedLayers.layers[0]

layer.exportFormats.forEach(exportFormat => {
    let options = {
        formats: exportFormat.fileFormat,
        scales: sizeToScale(exportFormat.size),
    }
    let tempLayer = layer.duplicate()
    tempLayer.name = exportFormat.prefix + tempLayer.name + exportFormat.suffix
    sketch.export(layer,options)
    tempLayer.parent = nil
})

function sizeToScale(size) {
    // need to write some regex to convert size to scale
    return scale
}
```

The most painful part is converting a layers’s exportFormat size to a scale that Sketch.export understands. The types of strings that can be possible for an exportFormat size is fairly large and it's complicated to convert that into just a scale.

The second painful part is not being able to specify prefix/suffix as an option when exporting. Sketch.export just uses the layer name. Thus, I have to duplicate the layer and rename it using the prefix and suffix options so that they get reflected in the export.