Question: Is there a way to get [ES6](https://github.com/lukehoban/es6features) in [sails.js](http://sailsjs.org/)?

Answer: 
This is a node.js question not specifically sails. Yes current version of node.js support certain ES2015 standards depending on your Node.js version and flags you use when you start your server. 

Most features are already active, however to use all features, you would use `node app.js --es_staging` or `node app.js --harmony` in your project folder instead of `sails lift`

The following link provides updated information on what features current version of Node support and how to access them.

<https://nodejs.org/en/docs/es6/>
You need to check compatibility of ES6 with node.js instead any framework like sails.js, express etc.

Because at last node.js will change the javaScript to server side code.
So it doesn't matter which framework you are using.

> 
> You can use the sails with ES6:
> 
> 
> 

For ES6 compatibility check [kangax.github.io](https://kangax.github.io/compat-table/es6/).

Recommended :

> 
> [Sails](http://sailsjs.org/) v 0.11.0 or greater
> 
> 
> [Node](https://nodejs.org/en/download/) v 4.*.* or greater 
> 
> 
> [npm](https://www.npmjs.com/) v 2.14.4 or greater 
> 
> 
> 

Now you are ready to explore new [Ecmascript6](https://developer.mozilla.org/en/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla) feature.

You will get the new feature from [http://es6-features.org/](http://es6-features.org/#Lexicalthis).

TEST :

Code:

```
ecma6Test:function(req,res,next){
    var evens =req.body.evens
    odds  = evens.map(v => v + 1);
    res.json({sucess:true,'odds':odds});
}

```

Request:

```
{"evens":[2,4,6,8,10]}

```

Response :

```
{
    "sucess": true,
    "odds":[3, 5, 7, 9, 11]
}

```