4 ms·
The syntax is better than the CommonJS one. Check the side by side comparison at http://jsmodules.io/cjs.html http://jsmodules.io/cjs.html However CommonJS is h
by pmontra 12y ago
The syntax is better than the CommonJS one. Check the side by side comparison at http://jsmodules.io/cjs.html http://jsmodules.io/cjs.html
However CommonJS is here now and JS engines might take a while to implement the new syntax. Example: the => (which is in the same ES6 draft) works in FF since version 22 and not in V8 yet.
http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts http://wiki.ecmascript.org/doku.php?id=harmony:specification...
- 178 12y agoThat is not an honest comparison, though. import { getCodec } from "iconv-lite"; would be var getCodec = require("iconv-lite").getCodec;