New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ES6 refactoring #356
ES6 refactoring #356
Conversation
|
@JPeer264 Thanks for doing this! If you feel like refactoring other parts (including tests), you are more than welcome to. 😸 |
@RyanZim I read this too but my shell output told me something else. Also it is just with let mkdir = require('../mkdirs')
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
... Thanks. I will first finish all other parts (including README) and start with all tests, if that is ok 👍 |
Strange. My test:
All files should be in strict mode anyhow, so don't worry about it. |
In the shell directly it works fine for me as well. But not if you run it from a file: $ node -v
v4.7.3
$ echo "let a = 1" >> foo.js && node foo.js |
Huh, never knew that. |
I refactored some files to ES6 according to #355 . Much things are not available in Node v4.
'use strict'
is a must in Node v4 iflet
is used. For consistency I also put it although nolet
is used.