I am using ES6 and Babel, I would like to know if there is a more concise way to rewrite the following function using rest/spread operators.
And how to set babel preset for that. Thanks guys.
init(fields, file, res, req) {
// I want the following mapping done automatically
this.fields = fields;
this.file = file;
this.res = res;
this.req = req;
},