Kai Dorschner
Freelancer & Frontend Developer
let x = 1;
[1, 2, 3].map(x => x * x)
import fs from 'fs';
class HomoSapiens extends HomoErectus {}
function point(x = 0, y = 0) {}
function concat(one, two, ...rest) {}
new Date(...dateFields)
[a, b] = [b, a]
function* generator() { yield 1; }
> npm install -g babel_
> node whatever.js_
> babel-node whatever.js_
> babel whatever.js > dist/whatever.js_
> babel whatever.js --watch --out-file whatever-compiled.js_
> babel src/ --out-dir dist/_
through io.js and .babelrc
> babel-node --harmony_arrow_functions --harmony_classes --harmony_object_literals --harmony_rest_parameters --harmony_scoping --harmony_templates whatever.js
Due to the limitations of ES5, Proxies cannot be transpiled or polyfilled. See support from various JavaScript engines.
Learn ES2015 # Proxies
... Date, Array and Error cannot be [subclassed] due to ES5 engine limitations.
Learn ES2015 # Subclassable Built-ins