Andrey Kobets
Andrey Kobets
``` js var foo = {bar: 1}; for (let key in foo) { for (let key in foo) { } } ``` => ``` js var foo = {bar: 1};...
``` bash #1 es6-transpiler ./myFile.es6 --options '{disallowUnknownReferences: false}' > ./myFile.js #2 es6-transpiler ./myFile.es6 --options ./options.js > ./myFile.js ```
**es6-transpiler.cmd** ``` bash @IF EXIST "%~dp0\/bin/sh.exe" ( "%~dp0\/bin/sh.exe" "%~dp0\node_modules\es6-transpiler\build\es5\es6toes5" %* ) ELSE ( /bin/sh "%~dp0\node_modules\es6-transpiler\build\es5\es6toes5" %* ) ``` After fix ``` bash @IF EXIST "%~dp0\node.exe" ( "%~dp0\node.exe" --harmony "%~dp0\..\es6-transpiler\build\es5\es6toes5.js" %*...
``` js #!/bin/bash function foo() { } ``` Error: ``` Error: Line 1: Unexpected token ILLEGAL ```
http://www.2ality.com/2014/04/call-stack-size.html _ECMAScript 6 will have tail call optimization: If a function call is the last action in a function, it is handled via a “jump”, not via a “subroutine call”....