node-compat-table icon indicating copy to clipboard operation
node-compat-table copied to clipboard

Node v4.9.1 supports "class" statement

Open borisovg opened this issue 7 years ago • 2 comments

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 avatar Jul 08 '18 12:07 borisovg

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

borisovg avatar Jul 08 '18 12:07 borisovg

I've stumbled on that as well.

It's quite a bug on node.green side

medikoo avatar May 20 '19 08:05 medikoo