DEV Community

[Comment from a deleted post]
Collapse
 
hanna profile image
Hanna

At least import follows the ECMAScript specifications!

Collapse
 
shadowtime2000 profile image
shadowtime2000

Well, technically, require does follow ECMAScript specifications because it is a valid Javascript function. But, I see your point on that.

 
hanna profile image
Hanna • Edited

Require isn't part of the ECMA specifications, it's part of CommonJS. As read here when you enable ES modules for your package.

 
qm3ster profile image
Mihail Malo

I think they mean that is syntactically/semantically looks like just a global function (even it if is not implemented as such in node).
In fact, that's what it was in web commonjs.