doc: 'constructor' implies use of new keyword
The square module is described as exporting a constructor, which would mean it would need to be invoked with the new keyword in bar.js after requiring it. Otherwise it's technically a factory function, not a constructor. PR-URL: https://github.com/nodejs/node/pull/17364 Reviewed-By:Anna Henningsen <anna@addaleax.net> Reviewed-By:
Jon Moss <me@jonathanmoss.me> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Timothy Gu <timothygu99@gmail.com>
parent
df79b7d8
Please register or sign in to comment