node-compat-table
node-compat-table copied to clipboard
Node v4.9.1 supports "class" statement
According to the Node.green table, Node 4.9.1 does not support classes, but it does?
borisov@glossy:~ $ sudo docker run -it mhart/alpine-node:4 node
> process.versions
{ http_parser: '2.8.0',
node: '4.9.1',
v8: '4.5.103.53',
uv: '1.9.1',
zlib: '1.2.11',
ares: '1.10.1-DEV',
modules: '46',
openssl: '1.0.2o' }
> class Foo {
... constructor () {
..... console.log('FOO');
..... }
... }
[Function: Foo]
> new Foo();
FOO
Foo {}
>
Guessing this is another case of ES6 things supported in "strict" mode?
I've stumbled on that as well.
It's quite a bug on node.green side