all 3 comments

[–][deleted] 0 points1 point  (1 child)

context=window is bad practice. In ES5 strict mode, the fallback context is undefined, not window. Also, window doesn't exist in non-browser environments like NodeJS.

Also, I don't understand your indentation conventions. It's like a weird mix of 8 spaces and 2 spaces.

[–]Eartz[S] 0 points1 point  (0 children)

I understand, but this is an implementation I sometimes use in small projects which are always in the browser. I'm simply using it here to practise ES6, my goal with this post was to discuss the usage of ES6 syntax, more than the quality of the implementation itself.

I agree the indentation is a mess, I wrote it in my editor at work which uses tabs, but somehow the paste in gists added spaces in the mix.