10

I cannot find anywhere info about what the plans will be with this ES6 feature. It would be very useful to have something similar as in the browser.

//------ lib.js ------
export const sqrt = Math.sqrt;
export function square(x) {
    return x * x;
}
export function diag(x, y) {
    return sqrt(square(x) + square(y));
}

//------ main.js ------
import { square, diag } from 'lib';
console.log(square(11)); // 121
console.log(diag(4, 3)); // 5
paul van bladel
  • 1,663
  • 14
  • 18

1 Answers1

2

Comment about ES6 module support from io.js core team member: https://github.com/iojs/io.js/issues/1043#issuecomment-78030670

Ilkka Oksanen
  • 87
  • 1
  • 3
  • 1
    Here is the money quote from those comments, "Apropos ES6 modules, nothing has been hashed out yet but the plan is to support them eventually. There is still a lot of work to be done in V8 before io.js can start looking into it, though." – honkskillet Mar 16 '15 at 06:08