williamkapke / node-compat-table

node.green - Node.js ECMAScript compatibility tables
https://node.green
Other
858 stars 33 forks source link

Node v4.9.1 supports "class" statement #53

Open borisovg opened 6 years ago

borisovg commented 6 years ago

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 {}
>
borisovg commented 6 years ago

Guessing this is another case of ES6 things supported in "strict" mode?

medikoo commented 5 years ago

I've stumbled on that as well.

It's quite a bug on node.green side