Hi, I switched to javascript ECMAScript-6 syntax some time ago and I like it! One thing that I noticed and cannot find the final answer is the use of nested destructive syntax when importing. I mean something like this ..
Suppose I have a file that looks like this.
export const SomeUtils = _.bindAll({
someFunc1(params){
},
someFunc2(params){
},
someFunc3(params){
}
});
I did something like this to get a specific function
import {Utils} from '../some/path/to/utils';
var {someFunc2} = Utils;
To understand, is there a way to do one row import for someFunc2? how can you do the destruction assignment of nested objects with parentheses? (Aka:) {Utils: [{someFunc2}]}?
I used var someFunc2 = require('../some/path/to/utils').someFunc2;, but I canβt figure out how to do this using the import statement