Exporting imports using module.exports and ES6
<p>I'm trying to import a function into a file and then export it from that file. This should be straightforward but for some reason I cannot get it to work.</p>

<p>search_action.js</p>

<pre><code>function search_actions() {

    this.receive_results = function() {
        return {
            type: 'RECEIVE_RESULTS',
            results: results
            }
        }
}

module.exports = search_actions
</code></pre>

<p>index.js</p>

<pre><code>require('es6-promise').polyfill();
var SearchActions = require('./search_actions.js') 
var search_actions = new SearchActions()
//console.log(search_actions.receive_results)
export search_actions.receive_results
</code></pre>

<p>The export at the bottom of index.js fails with unexpected token despite the fact that console.log(search_actions.receive_results) prints the function. So what is the proper way of doing this? </p>