nazerke
7/23/2015 - 3:13 PM

Future ES6 module pattern

Future ES6 module pattern

var o = {bar: "bar"};

export function bar(){ //export exposes api
        return o.bar;}
        
___________

//importing function from module
import bar from foo
bar()

//import whole module
module foo from foo()
foo.bar()